DVA-C02 exam dumps

DVA-C02 practice question 392 of 399

AWS Certified Developer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DVA-C02 Question 392

Single answer

You are developing an e-commerce application where customers can place orders. To handle high concurrency during flash sales, you use an Amazon SQS queue to decouple order requests from downstream order processing. However, you notice that some orders are being processed multiple times due to concurrency issues. What is the most effective way to ensure that each order is processed only once?

  1. A

    Implement deduplication by enabling the Content-Based Deduplication feature of Amazon SQS.

  2. B

    Increase the visibility timeout of the SQS queue to ensure messages are not reprocessed before completion.

  3. C

    Use an Amazon SQS FIFO (First-In-First-Out) queue instead of a standard queue.

  4. D

    Manually track processed messages in a database to avoid duplicate processing.

Show answer and explanation

Correct answer: A

Explanation

To handle high-concurrency scenarios in Amazon SQS while ensuring each message is processed only once, enabling Content-Based Deduplication on an SQS FIFO queue is the most effective solution. This feature automatically detects duplicate messages based on their content or a deduplication ID, reducing the risk of duplicate processing in high-throughput environments.

  • A. Correct.

    Enabling Content-Based Deduplication on an SQS FIFO queue ensures that duplicate messages with the same content are not processed. This is the most reliable and efficient solution for preventing duplicate processing.

  • B. Incorrect.

    Increasing the visibility timeout can help avoid duplicate processing if a task takes longer to process, but it does not guarantee deduplication on its own.

  • C. Incorrect.

    While an SQS FIFO queue enforces ordering and limits duplicates, deduplication requires enabling the Content-Based Deduplication feature explicitly or providing a unique deduplication ID.

  • D. Incorrect.

    Manually tracking processed messages in a database is possible but introduces additional complexity and overhead. AWS services like SQS offer built-in deduplication features to handle this more effectively.

Timed practice exam

Take a DVA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam