AWS Developer DVA-C02 · Development with AWS Services · medium
A financial ledger uses Amazon SQS FIFO (First-In-First-Out) queues (orders.fifo) to guarantee strict message ordering and exactly-once processing within a 5-minute window. Multiple producer microservices publish order events for thousands of different customers (CustomerId). If every producer sets the exact same static MessageGroupId = "ALL_ORDERS" on every message, what performance bottleneck occurs, and how should MessageGroupId be designed instead?
Published · Last updated · checked before publication — how we verify questions
Options
Answer: B. Messages serialize into one stream; set MessageGroupId = CustomerId for parallelism
In an Amazon SQS FIFO queue, MessageGroupId defines the boundary for strict ordering: SQS processes messages within the same MessageGroupId one batch/consumer at a time so order is preserved. Setting a single static MessageGroupId serializes the entire queue to a single active consumer stream. Setting MessageGroupId = CustomerId (high cardinality) preserves strict ordering per customer while allowing thousands of different customers' orders to be processed in parallel.
Why the other options are wrong
- A. The FIFO queue automatically converts itself into an Amazon SNS standard topic — SQS FIFO queues never convert themselves into SNS topics.
- C. Messages sharing the same MessageGroupId are immediately dropped as duplicates — MessageDeduplicationId (not MessageGroupId) controls 5-minute duplicate suppression.
- D. SQS FIFO deletes messages older than 60 seconds when MessageGroupId = "ALL_ORDERS" — SQS retains messages up to the configured MessageRetentionPeriod (4 days default, up to 14 days).
More Development with AWS Services questions
- An Amazon API Gateway REST API fronts a legacy product-catalog backend that takes 800 ms per query. Because 90% of…
- A customer-facing checkout API built on AWS Lambda (Java 21 runtime) experiences a 3.2-second cold-start latency spike…
- An AWS Lambda function polls an Amazon SQS standard queue via an Event Source Mapping with a batch size of 10…
- An order-fulfillment workflow coordinates 6 sequential and parallel steps: reserve inventory, charge credit card…
- Five different AWS Lambda functions written in Python 3.12 share the same 45 MB internal cryptography and…
- A photo-sharing platform stores private user photos in an Amazon S3 bucket (Block Public Access = ON). When an…
- A web application hosted on https://app.example.com makes an XMLHttpRequest / fetch() POST call (with a custom…
- A developer is designing indexes for an Amazon DynamoDB Orders table whose base primary key is CustomerId (Partition…
All Development with AWS Services questions and the topic overview →
AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.