Sync Queue
Component Detail
Data Layer
medium complexity
mobile
1
Dependencies
1
Dependents
6
Entities
0
Integrations
Description
Persistent queue that tracks all data mutations (creates, updates, deletes) made while offline, storing them with timestamps and retry counters. When connectivity is restored, the Background Sync service processes this queue in order, applying conflict resolution rules such as last-write-wins for most fields and server-authoritative for approval statuses.
sync-queue
Responsibilities
- Enqueue all offline mutations with timestamps and operation types
- Persist queue entries to survive app restarts and crashes
- Track retry counts and failure reasons per queue entry
- Provide ordered retrieval for sequential sync processing
- Support conflict resolution metadata for server reconciliation
Interfaces
enqueue(operation)
dequeue()
peek()
getQueueSize()
getQueuedOperations()
markAsProcessed(operationId)
markAsFailed(operationId, reason)
incrementRetryCount(operationId)
getFailedOperations()
clearProcessedEntries()
getOperationsByEntity(entityType)
reorderQueue()
Relationships
Related Data Entities (6)
Data entities managed by this component