SAA-C03 Practice Question 94: SQS FIFO Message Group ID
AWS Certified Solutions Architect – Associate (SAA-C03) · Test 10 · question 4 of 10
An e-commerce platform publishes order events (created, paid, shipped, cancelled) to a queue. The events for any single customer must be processed in the exact order they were sent. Events for different customers are independent, and the team needs many consumers running in parallel to keep up with peak traffic.
How should the queue be designed?
Show answer and explanation
Answer:
In an SQS FIFO queue, ordering is guaranteed within a message group, and messages in different groups can be processed in parallel by different consumers. Using the customer ID as the group ID gives strict ordering for each customer, and while a message from one group is in flight SQS holds back later messages from that group, so a single customer's events are never handled out of order. Consumers can scale out across the many groups, which meets the parallelism requirement.
Option A pushes the ordering problem to the application. Standard queues offer best-effort ordering and at-least-once delivery, so consumers would need to buffer and reorder messages themselves, which is complex and can stall when an event is delayed.
Option B is correct about FIFO but wrong about the group. With one group for all messages, the whole queue is processed in a single strict order, so only one consumer can make progress at a time and throughput cannot scale out.
Option C does not provide ordering. The visibility timeout hides a message after it is received; it says nothing about the order in which messages are delivered, and a standard queue can hand out one customer's events in any order.
Reference: Using the message group ID with Amazon SQS FIFO queues