Appearance
Ordering and delivery
After acceptance
- Accepted messages go to every consumer whose subscription matches the
message_type: exact (story.context), a family (telling.*) or everything. - Order is kept per
correlation_id: messages with the samecorrelation_idarrive in the order the bus published them. There is no order across different ids. Keep onecorrelation_idfor a story's whole life (correlation_id.changed). - Delivery is at least once. A consumer can see the same
message_idagain after a failure, a replay or a redrive. - The message itself is never changed. A reader of the queue with AWS credentials receives the producer's exact bytes; the HTTPS pull API returns the same envelope, parsed, as JSON.
What a consumer receives Available now
Each consumer connection has its own queue, which you read over the HTTPS pull API or, with an AWS reader role you register, with AWS credentials.
- Over the pull API, each message is the producer's envelope, parsed, with
message_type,correlation_id,topic,producer_id,receive_countandenqueued_atalongside (Receive). - From the queue with AWS credentials, the body is the producer's envelope, byte for byte, and these SQS message attributes come with it:
message_type,family,topic,correlation_id,producer_id,system_id,som_version. - A connection's filter chooses by message type, topic prefix and source (Subscriptions and filters).
- Order is per
correlation_id. While a message is received and not yet acknowledged, the rest of its story waits. A message you don't acknowledge comes back when its visibility runs out (60 seconds by default), and blocks the rest of its story for you until it succeeds or moves to the dead-letter queue, after 5 attempts unless you chose another limit for the connection. - Messages wait 14 days in the queue.
What a consumer must do
- Ignore
message_types andextensionsyou don't recognise. Don't branch onsom_version. - Be idempotent on
message_id: replay and redrive deliver again. - Keep the highest
sequence_numberperstory_idand drop older snapshots. A message redriven from the dead-letter queue lands behind newer ones.
Replay Available now
The bus archives every accepted message (30 days on the Sandbox, 7 on Preview). From the portal you can have a time range delivered again to one of your queues, and move your dead-letter queue back to your queue. See Dead-letter queues and replay.