DVA-C02 exam dumps

DVA-C02 practice question 396 of 399

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

DVA-C02 Question 396

Single answer

Your application processes user-uploaded files and uses Amazon SQS to store metadata about the files. Occasionally, some messages are not processed due to application errors, and you want to ensure these unprocessed messages are captured for later analysis. How can you achieve this using Amazon SQS?

  1. A

    Configure a Dead Letter Queue (DLQ) and associate it with your SQS queue.

  2. B

    Enable message encryption for the SQS queue to prevent processing errors.

  3. C

    Set the visibility timeout of the SQS queue to zero to automatically retry failed messages.

  4. D

    Use Amazon SNS to forward unprocessed messages to another queue.

Show answer and explanation

Correct answer: A

Explanation

To handle unprocessed messages in Amazon SQS, you can configure a Dead Letter Queue (DLQ). When a message exceeds the maximum number of processing attempts specified in the redrive policy, it is moved to the DLQ. This allows you to analyze and debug these messages without losing them, ensuring better reliability and troubleshooting in your application.

  • A. Correct.

    Correct. A Dead Letter Queue (DLQ) can be associated with your SQS queue to capture messages that fail to be processed after a specified number of retries.

  • B. Incorrect.

    Incorrect. Message encryption protects data in transit and at rest but does not help in handling unprocessed messages.

  • C. Incorrect.

    Incorrect. Setting the visibility timeout to zero would cause immediate retries of messages, which does not solve the issue of capturing unprocessed messages.

  • D. Incorrect.

    Incorrect. While Amazon SNS can help with message broadcasting, it is not designed to forward unprocessed messages to another queue in the context of SQS.

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