ExitAmazon SNS: FIFO ordering and deduplication1 / 9
Explanation

Ordering belongs to a message group

How FIFO topics preserve message-group ordering and suppress duplicates, including the conditions for exactly-once delivery to SQS FIFO queues. · advanced

An SNS FIFO topic preserves ordering within each message group, not across the whole topic. The publisher supplies a MessageGroupId: messages in that group follow the order in which SNS receives them. Different groups can progress independently, with no ordering guarantee between them.

The ordered delivery path uses an SNS FIFO topic and a subscribed SQS FIFO queue. A FIFO topic can also deliver to SQS standard queues, but that path does not preserve the strict FIFO guarantee. The diagram shows message flow; receiving and deleting are consumer operations on the queue.

The two middle components have distinct contracts: SNS provides FIFO topic publishing and fan-out; SQS provides the subscribed FIFO queue and its receive/delete interface. An EventBridge event bus or Kinesis data stream is neither of these FIFO resources and cannot replace either one while retaining this SNS-to-SQS contract.

Group/deduplication IDsOrdered unique messagesReceived messages
AWS Tools and SDKsPublisher: group and deduplication IDs
Amazon Simple Notification Service (Amazon SNS)FIFO topic: ordered, deduplicated fan-out
Amazon Simple Queue Service (Amazon SQS)Subscribed FIFO queue: delivery permitted, no filter
Amazon EC2Consumer: process and delete before timeout

1 / 5 The publisher sends each message with a message-group ID and a deduplication identity. These identify the ordering group and a publication that may be retried.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.