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?

  1. Use an SQS FIFO queue. Configure the visibility timeout value. Source Reference Answer
  2. Use an SQS standard queue with a SendMessageBatchRequestEntry data type. Configure the DelaySeconds values.
  3. Use an SQS standard queue with a SendMessageBatchRequestEntry data type. Configure the visibility timeout value.
  4. Use an SQS FIFO queue. Configure the DelaySeconds value.

Community Votes

A
100%

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)

65703c1 👍 2 Selected: A
A is the correct answer.
KarBiswa 👍 4 Selected: A
Emphasizes on the order so A is best
ANDRES715 👍 4 Selected: A
Al 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.
CrescentShared 👍 2 Selected: A
A is correct

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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 DelaySeconds only 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, DelaySeconds does 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 →

← Back to DVA-C02 Study Guide