FIFO Queues
Strict ordering and exactly-once processing — per message group.
Use FIFO when the order of operations matters (financial transactions, ride-state updates) or when you cannot tolerate duplicate sends from the producer.
What it is
FIFO (First-In-First-Out) queues preserve the exact order in which messages are sent and received within a message group. Unlike standard queues, FIFO queues do not introduce duplicate messages on the producer side when you retry SendMessage within the deduplication interval.
Queue naming
FIFO queue names must end with the .fifo suffix. The suffix counts toward the 80-character queue name limit.
orders-prod.fifo # valid
orders-prod # invalid for FIFOOrdering model
Order is preserved within a single MessageGroupId. Messages with different message group IDs can be processed in parallel by different consumers. Within a group, only one consumer processes messages at a time.
- Same MessageGroupId → strict sequence, one consumer at a time.
- Different MessageGroupIds → parallel processing across groups.
- While a message is in-flight in a group, subsequent messages in that group are not available until it is deleted or the visibility timeout expires.
Exactly-once processing (producer side)
Within a 5-minute deduplication interval, SQS rejects duplicate sends with the same MessageDeduplicationId. Enable content-based deduplication to have SQS hash the message body as the deduplication ID automatically.
- Provide MessageDeduplicationId explicitly, or enable ContentBasedDeduplication on the queue.
- Retries of SendMessage within 5 minutes do not create duplicate messages in the queue.
Throughput limits
FIFO queues have lower throughput than standard queues. With batching you can reach much higher rates; high-throughput FIFO mode raises limits further using partition-based distribution.
- Default: 300 messages/sec per API action (Send, Receive, Delete counted separately).
- With batching: up to 3,000 messages/sec per API action.
- High-throughput FIFO: per-partition limits up to 3,000 msg/sec with batching.
DLQ caution
AWS recommends caution when using a DLQ with FIFO queues if preserving exact order of operations is critical — moving a message to a DLQ can affect ordering semantics for related workflows.
- !All messages with the same MessageGroupId go to one consumer at a time. A 'hot' group becomes a bottleneck.
- !Deduplication is by ID + 5-minute window — not content forever. The same payload sent 6 minutes later WILL be delivered again.
- !A poisoned message in a group blocks every message behind it until the visibility timeout expires.