Standard vs FIFO Queues
Pick between maximum throughput and strict ordering.
1 min read
| Standard queue | FIFO queue | |
|---|---|---|
| Ordering | Best effort (mostly in order) | Strict first-in, first-out within a message group |
| Delivery | At least once: a message can occasionally arrive twice | Exactly-once processing, with deduplication |
| Throughput | Nearly unlimited | High, but with limits |
| Name | Anything | Must end in .fifo |
Message groups
FIFO ordering applies per message group ID. Use something like a customer ID: each customer's messages are processed in order, but different customers are processed in parallel.
Tip
Default to Standard and make your consumer idempotent (safe to run twice). Choose FIFO only when order truly matters, like bank-account transactions or a series of state changes for one entity.
Key takeaways
- Standard: massive throughput, at-least-once delivery, best-effort ordering.
- FIFO: strict order per message group, with deduplication.
- Make consumers idempotent either way.
Check your understanding
Pick an answer to see the explanation.
1. Deposits and withdrawals for each account must be applied in order. Which queue setup?