Consumer Messaging Platform — WhatsApp-Class System  ·  View 09 of 23

Offline Queuing and Retry Loop

The loop that makes delivery survive a device being off, offline or asleep — and the acknowledgement that closes it.

Editable source SVG draw.io All views
Undelivered ciphertext
Per-device inbox
Undelivered ciphertext...
Push wake
APNs / FCM, no content
Push wake...
Client reconnects
Noise session resume
Client reconnects...
Inbox drain
Ordered by server id
Inbox drain...
Per-message ack
Deduplicated by id
Per-message ack...
Purge from server
Or TTL at 30 days
Purge from server...
At-least-once delivery
At-least-once delivery
silent push
silent push
socket opens
socket opens
batched pull
batched pull
ack each id
ack each id
delete ciphertext
delete ciphertext
re-queue if no ack
re-queue if no ack
Offline Queuing and Retry Loop
Offline Queuing and Retry Loop
Data store
Data store
Interface / broker
Interface / broker
Application we own
Application we own
Retry uses exponential backoff with jitter; the client discards duplicates by message id.
Retry uses exponential backoff with jitter; the client discards duplicates by message id.
v 1.0 · owner Platform Architecture · date 2026-08
v 1.0 · owner Platform Architecture · date 2026-08
Text is not SVG - cannot display

The loop closes

  • Ciphertext is only deleted after a per-message acknowledgement from the device
  • No acknowledgement means the message is re-queued, not dropped
  • The thirty-day TTL is the only exit that is not an acknowledgement

Retry policy

  • Exponential backoff with jitter, capped so a fleet-wide reconnect does not stampede
  • Push is a wake signal only; the client pulls its own inbox after reconnecting
  • Drains are batched and ordered by server id to keep the client's write path sequential

Idempotency

  • The client discards duplicates by message id, so re-delivery is always safe
  • This is what lets the server choose at-least-once and stay simple
  • Receipts are idempotent for the same reason