AWS Certified Solutions Architect Professional SAP-C02 Practice Question
During a modernization effort, an on-premises e-commerce platform is being refactored into microservices on AWS. The new Order service must publish an event that triggers the Payment service whenever a customer completes checkout. Requirements for the messaging layer are as follows: the Payment service must never process the same order more than once, messages that relate to the same order must be delivered in the exact sequence in which they were generated, holiday sales can create burst traffic of tens of thousands of orders per second so the solution must scale automatically without manual sharding, and operations staff want to keep queue-management overhead to a minimum.
Which solution meets these requirements?
Publish events to an Amazon SNS FIFO topic. Configure an Amazon SQS FIFO queue subscription for the Payment service.
Publish events to an Amazon SQS FIFO queue with high-throughput mode enabled. Set the MessageGroupId to the order ID and turn on content-based deduplication.
Publish events to an Amazon SQS standard queue. Include the order ID in a message attribute so the consumer can ignore duplicate messages that occasionally appear.
Publish events to an Amazon SQS FIFO queue that uses a single MessageGroupId value such as "payment" for every message. Configure the consumer to process messages sequentially.
An Amazon SQS FIFO queue guarantees strict message ordering and offers exactly-once processing through message deduplication. Enabling high-throughput mode allows the queue to scale automatically to many thousands of messages per second without manual sharding. Using the order ID as the MessageGroupId confines ordering to each individual order while permitting parallel processing across different orders, and turning on content-based deduplication prevents accidental re-submission of the same order from creating duplicates.
A standard queue does not guarantee ordering and can deliver duplicates, so the consumer would still have to guard against both issues. A FIFO queue that uses a single MessageGroupId preserves order and eliminates duplicates but limits throughput to a single message group, which cannot handle tens of thousands of orders per second. An SNS FIFO topic with an SQS FIFO queue subscription is a valid pattern for ordered, exactly-once delivery, but it adds an unnecessary additional service to manage and introduces complexity when an SQS FIFO queue alone can solve the problem.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Amazon SQS FIFO queue's MessageGroupId, and how does it work?
Open an interactive chat with Bash
What is high-throughput mode in Amazon SQS FIFO queues?
Open an interactive chat with Bash
What is content-based deduplication in Amazon SQS FIFO queues?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Accelerate Workload Migration and Modernization
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access