Minimizing SQS Data Loss During Downtime

Answer Correct answer: A, C — Increase the message retention period and attach a dead-letter queue to minimize data loss.

An application consumes messages from an Amazon Simple Queue Service (Amazon SQS) queue. The application experiences occasional downtime. As a result of the downtime, messages within the queue expire and are deleted after 1 day. The message deletions cause data loss for the application. Which solutions will minimize data loss for the application? (Choose two.)

  1. Increase the message retention period Correct Answer
  2. Increase the visibility timeout.
  3. Attach a dead-letter queue (DLQ) to the SQS queue. Correct Answer
  4. Use a delay queue to delay message delivery
  5. Reduce message processing time.

Community Votes

AC
62%
AE
38%

62% of anonymous learners picked answer AC. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

The core concept is SQS durability during unavailability; the trap is assuming DLQs handle expired messages or that visibility timeouts affect persistence.

This question addresses how to prevent data loss in Amazon SQS when applications experience downtime. The correct solutions involve extending message retention and utilizing dead-letter queues for recovery.

Many candidates choose B (Visibility Timeout) or D (Delay Queue), confusing message delivery timing with message storage duration.

Community Discussion (5 comments)

axantroff 👍 1 Selected: AE
In my opinion, A is obvious and one of the two correct answers. Additionally, I checked B, C, and D in more detail, and they basically do not make sense as they do not contribute in any way to handling messages that were just delayed. See the documentation for reference: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html https://aws.amazon.com/what-is/dead-letter-queue/ So, only E remains as another valid option. It makes sense because the faster we are able to process events, the less likely we are to violate the expiration policy
HagarTheHorrible 👍 1 Selected: AC
Increasing the message retention period (A) ensures messages are available longer, while attaching a dead-letter queue (C) allows recovery and reprocessing of unprocessed messages, effectively minimizing data loss.
altonh 👍 2 Selected: AE
It cannot be C. Messages go to DLQ only if processed. But if the message is not processed at all and it expires, then it will be deleted from the queue.
aragon_saa 👍 1 Selected: AC
Answer is AC
matt200 👍 3 Selected: AC
To minimize data loss for the application consuming messages from an Amazon SQS queue, the following two solutions are most effective: A. Increase the message retention period: By increasing the message retention period, you ensure that messages remain in the queue for a longer duration before being automatically deleted. This provides more time for the application to recover from downtime and process the messages, thereby reducing the chance of data loss due to message expiration. C. Attach a dead-letter queue (DLQ) to the SQS queue: A DLQ can be used to capture messages that cannot be processed successfully. When messages fail to be processed after a certain number of attempts (as defined by the redrive policy), they are moved to the DLQ. This allows you to investigate and handle these messages separately, preventing data loss.

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

Why the Answer Is Correct

To minimize data loss, you must ensure messages survive the downtime period. Increasing the message retention period (A) directly extends the time messages stay in the queue before expiration, preventing deletion while the app is down. Attaching a dead-letter queue (C) allows failed or unprocessed messages to be routed there after maximum receive counts are exhausted, preserving them for manual inspection or reprocessing rather than permanent deletion.

Why the Other Options Are Wrong

Increasing the visibility timeout (B) only delays when a processed message becomes visible again; it does not prevent expiration if the app is completely down. Using a delay queue (D) postpones initial delivery but does not extend the overall retention period. Reducing processing time (E) helps throughput but does not solve the problem of messages expiring during extended downtime.

Community Comment Notes

The community majority correctly identified AC, though some argued against C because DLQs typically require message processing attempts. However, as noted by users like matt200, DLQs are crucial for preventing data loss from failed deliveries. One user altonh incorrectly claimed C is invalid because messages go to DLQ only if processed, missing that SQS can move messages to DLQ based on receive count even if they are never successfully 'completed'.

Official Reference

Exam Strategy

Always distinguish between message visibility/delivery controls and message persistence/retention settings when dealing with data loss scenarios.

Frequently Asked Questions

Does increasing visibility timeout prevent data loss?

No. Visibility timeout only affects when a message becomes available after being received, not how long it stays in the queue before expiration.

Can DLQs save messages that expire due to downtime?

DLQs do not prevent expiration, but they capture messages that fail processing repeatedly, preventing permanent deletion and allowing recovery.

More DEA-C01 FAQ →

Related Analysis

Practice All DEA-C01 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DEA-C01 Practice Test →

← Back to DEA-C01 Study Guide