How to prevent out-of-order updates with Amazon SQS FIFO queues?
An application that runs on AWS receives messages from an Amazon Simple Queue Service (Amazon SQS) queue and processes the messages in batches. The application sends the data to another SQS queue to be consumed by another legacy application. The legacy system can take up to 5 minutes to process some transaction data. A developer wants to ensure that there are no out-of-order updates in the legacy system. The developer cannot alter the behavior of the legacy system. Which solution will meet these requirements?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests your knowledge that only SQS FIFO queues provide strict ordering, and that the visibility timeout must be tuned to accommodate long-running legacy processing (up to 5 minutes) to avoid duplicate or out-of-order delivery.
To guarantee strict message ordering for a legacy system consuming from Amazon SQS, developers must use an SQS FIFO queue combined with an appropriately configured visibility timeout. Community consensus (100% vote for A) confirms this is the only reliable way to prevent out-of-order updates.
Candidates often choose D (FIFO with DelaySeconds) because DelaySeconds sounds like it could 'wait' for the legacy system, but DelaySeconds only postpones initial message availability—it does not control how long a message stays hidden while being processed.
Community Discussion (4 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Correct Answer: A — Use an SQS FIFO queue. Configure the visibility timeout value.
The key requirement in this scenario is "no out-of-order updates" in the legacy system, and the developer cannot alter the legacy system. The only Amazon SQS feature that guarantees strict, first-in-first-out delivery is the FIFO queue. Standard queues (options B and C) provide best-effort ordering but can and will deliver messages out of order, so they are immediately eliminated.
Why Visibility Timeout is the Right Configuration
The visibility timeout is the period during which a message, once received by a consumer, is hidden from other consumers. The legacy system can take up to 5 minutes to process a transaction. If the visibility timeout is shorter than the processing time, the message becomes visible again and could be picked up by another worker or reprocessed, leading to duplicate or out-of-order updates. Therefore, the developer must set the visibility timeout to a value greater than 5 minutes (the maximum allowed visibility timeout for SQS is 12 hours, so this is well within limits).
Why the Other Options Fail
- Option B (Standard queue + DelaySeconds): Standard queues do not guarantee ordering, and
DelaySecondsonly delays when a message initially becomes available in the queue—it has no effect on processing order or visibility during consumption. - Option C (Standard queue + Visibility Timeout): Even with a long visibility timeout, standard queues still cannot guarantee ordering.
- Option D (FIFO queue + DelaySeconds): While FIFO guarantees ordering,
DelaySecondsdoes not solve the problem of a long-running consumer. Without extending the visibility timeout, the message could reappear mid-processing, causing duplicates or race conditions in the legacy system.
Community Consensus
All community voters (100%) selected A, with commenters correctly emphasizing that the word "order" in the question is the decisive keyword pointing to FIFO queues, and that visibility timeout is the mechanism to protect long-running processing.
Official Reference
Exam Strategy
When an AWS exam question mentions 'order', 'ordering', or 'no out-of-order', immediately think SQS FIFO queue. Then check the second part of the answer: if processing is long-running, the required configuration is almost always visibility timeout, not DelaySeconds.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →