A national e-commerce retailer processes 20,000 orders per hour during flash sales. Payment events must be processed exactly once and in order per customer to avoid double charges, while inventory updates can tolerate duplicates and out-of-order delivery for higher throughput. What messaging design satisfies both needs?
Select an answer to reveal the explanation.
Short Explanation
Do all packages need signature confirmation? You save money by reserving strict handling for payments with FIFO ordering and deduplication. Inventory can ride the fast standard lane where occasional repeats are harmless.
Full Explanation
SQS FIFO queues provide exactly-once processing semantics through message deduplication IDs and per-message-group ordering, which directly addresses the payment requirement where duplicate or reordered charges per customer are unacceptable, while standard queues offer higher throughput with at-least-once delivery that suits idempotent inventory consumers. Separating the two workloads allows each to use appropriate delivery guarantees and scaling characteristics without compromising the other. A single SNS topic provides fanout pub-sub but offers no ordering or deduplication, so payments could duplicate or reorder. Kinesis can preserve order within a partition key, but a single shard throttles flash-sale throughput and random partition keys break per-customer ordering while adding operational overhead. EventBridge provides durable event routing with retries but does not guarantee global ordering or exactly-once delivery, making it unsuitable for strict payment sequencing. For the exam, map strict per-key order plus dedup to FIFO and high-throughput tolerance to standard, and in practice verify consumer idempotency even with FIFO.