DVA-C02 exam dumps

DVA-C02 practice question 394 of 399

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

DVA-C02 Question 394

Single answer

You are developing an application that processes orders from an SQS queue. The application must ensure that the processing of orders is highly concurrent but does not allow duplicate processing of the same message. Which approach should you use to achieve this?

  1. A

    Use an SQS FIFO queue and ensure that the MessageGroupId is the same for all messages.

  2. B

    Use an SQS Standard queue and implement client-side deduplication logic.

  3. C

    Use an SQS FIFO queue and set a unique MessageGroupId for each order.

  4. D

    Use an SQS Standard queue with long polling enabled and process messages in parallel without additional checks.

Show answer and explanation

Correct answer: C

Explanation

To achieve high concurrency while preventing duplicate message processing, you should use an SQS FIFO queue with a unique MessageGroupId for each order. FIFO queues guarantee exactly-once processing and allow parallel processing of messages in different groups. Standard queues, while supporting high concurrency, do not guarantee exactly-once delivery, and client-side deduplication introduces unnecessary complexity and risk.

  • A. Incorrect.

    This option is incorrect. While FIFO queues ensure message order, using the same MessageGroupId for all messages would serialize message processing, which eliminates concurrency.

  • B. Incorrect.

    This option is incorrect. Although SQS Standard queues allow high concurrency, they do not guarantee exactly-once processing, and implementing client-side deduplication is error-prone and not ideal for this scenario.

  • C. Correct.

    This option is correct. SQS FIFO queues ensure exactly-once message processing and allow high concurrency when unique MessageGroupIds are assigned to each order, as messages in different groups can be processed in parallel.

  • D. Incorrect.

    This option is incorrect. While SQS Standard queues and long polling support high concurrency, they do not guarantee that messages will not be processed more than once, which violates the requirement to avoid duplicate processing.

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