Courseiva
Question 1,263 of 724
Troubleshooting and OptimizationmediumMultiple SelectObjective-mapped

DVA-C02 Troubleshooting and Optimization Practice Question

A developer is debugging an application that uses Amazon SQS. The application occasionally processes the same message twice. Which TWO configurations can help prevent duplicate processing?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Increase the visibility timeout to ensure messages are deleted before becoming visible again.

Increasing the visibility timeout gives the consumer more time to process and delete the message before it becomes visible again, reducing the chance of duplicate processing from another consumer. Option E is correct: using a FIFO queue with content-based deduplication ensures exactly-once processing by deduplicating messages with the same deduplication ID or based on message content within a 5-minute deduplication interval. Option B is incorrect: a dead-letter queue is used to capture messages that fail processing, not to prevent duplicates. Option C is incorrect: increasing the delivery delay only delays the first delivery of a message, it does not prevent duplicate processing. Option D is incorrect: enabling long polling reduces empty responses and improves efficiency but does not prevent duplicates.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Increase the visibility timeout to ensure messages are deleted before becoming visible again.

    Why this is correct

    A message in SQS is hidden from other consumers the moment it is received, but only for the duration of the visibility timeout. If your processing time exceeds this window, the message becomes visible again and can be picked up by another consumer, causing the same message to be processed twice. Increasing the visibility timeout gives the original consumer enough time to finish processing and call DeleteMessage, so the message is removed before it can ever be redelivered.

  • Configure a dead-letter queue to capture duplicates.

    Why it's wrong here

    A dead-letter queue (DLQ) is not designed to deduplicate messages; it exists to quarantine messages that repeatedly fail to be processed after a configured number of receive attempts. Duplicate processing happens when a message becomes visible again after its visibility timeout expires, and a DLQ has no mechanism to prevent that redelivery. It simply stores those problematic messages for later analysis, but it does not stop the underlying duplicate from being consumed.

  • Increase the delivery delay to defer message processing.

    Why it's wrong here

    The delivery delay feature, also known as delay queues, postpones the first time a message becomes available to consumers by a set number of seconds. Once that initial delay elapses and the message is delivered, the delay has no further impact on how SQS handles that message. It does not extend the visibility timeout, so a message can still be redelivered and processed twice if the consumer takes too long to delete it.

  • Enable long polling to reduce empty responses.

    Why it's wrong here

    Long polling is a technique that reduces the number of empty ReceiveMessage responses by holding the connection open until a message arrives or the poll interval expires. This saves API calls and lowers cost, but it does not change SQS's at-least-once delivery guarantee. Even with long polling enabled, a standard queue can still deliver the same message more than once when the visibility timeout is too short, so long polling is irrelevant to the duplicate-processing problem.

  • Use a FIFO queue with content-based deduplication.

    Why this is correct

    FIFO queues provide exactly-once processing by design, which eliminates the duplicate delivery issue inherent to standard SQS queues. With content-based deduplication, SQS uses a SHA-256 hash of the message body to detect and discard duplicate messages sent within a 5-minute deduplication interval, ensuring each message is delivered and processed exactly once. This directly addresses the root cause of duplicate processing, unlike visibility timeout tuning which only reduces the likelihood.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 20, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.