How to prevent out-of-order updates with Amazon SQS FIFO queues?
Short answer
A Use an SQS FIFO queue. Configure the visibility timeout value.
Question
Key Takeaways
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.
Common mistake: 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.
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
- https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
- https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
These links open the official vendor documentation in a new tab.
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.
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
ANDRES715 👍 4 Answered AAl utilizar una cola SQS FIFO, se garantiza que los mensajes se procesen en el orden en que se reciben. Esto evita actualizaciones desordenadas en el sistema heredado y asegura la coherencia en el procesamiento de los datos de transacciones. Además, al configurar el valor del tiempo de espera de visibilidad, se puede controlar el tiempo durante el cual un mensaje permanece invisible para otros consumidores después de que un consumidor lo recibe. Esto permite que el sistema heredado tenga hasta 5 minutos para procesar algunos datos de transacciones antes de que estén disponibles para otros consumidores.
-
KarBiswa 👍 4 Answered AEmphasizes on the order so A is best
-
65703c1 👍 2 Answered AA is the correct answer.
-
CrescentShared 👍 2 Answered AA is correct
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →