Software Design

How Message Delivery States Work in Real-Time Chat

State Diagrams · made in Skemio

State diagram showing message states: Initial to Pending, then Sent, Delivered, Read, and Final state, with a Failed retry path.
State diagram showing message states: Initial to Pending, then Sent, Delivered, Read, and Final state, with a Failed retry path.

What it shows

  • Local queue buffers 'Pending' with client-generated idempotency keys
  • Server ACK transitions 'Sent' before pushing via WebSocket or APNs
  • 'Delivered' and 'Read' require distinct async receipt event streams

The takeaway

Client-side idempotency keys prevent duplicate sends when mobile networks fluctuate.

More state diagrams