Reliable Message Delivery: Offline Storage and the Sent→Read State Machine

goyalshaliniuk · x · 2026-12-04

Parts 3-4 of a messaging design series. Delivery pipeline: sender submits, Message Service validates and assigns a unique ID, the message is persisted, a delivery event enters a queue, and the Delivery Service routes it to the recipient. For offline users: durably store undelivered messages, track per-recipient delivery state, notify via APNs/FCM when appropriate, deliver pending messages on reconnect, and update acknowledgements. Message states (Sent → Server Accepted → Delivered → Read) must be tracked separately, since server acceptance does not mean recipient delivery.

Original post →

More from coding & agent

coding & agent channel →