Learn how to configure a dead-letter queue (DLQ) in Amazon Simple Queue Service (Amazon SQS) to isolate faulty messages and ensure that the system continues to process subsequent messages.
Table of Contents
Question
A company has implemented an ordering system using an event-driven architecture. During initial testing, the system stopped processing orders. Further log analysis revealed that one order message in an Amazon Simple Queue Service (Amazon SQS) standard queue was causing an error on the backend and blocking all subsequent order messages. The visibility timeout of the queue is set to 30 seconds, and the backend processing timeout is set to 10 seconds. A solutions architect needs to analyze faulty order messages and ensure that the system continues to process subsequent messages.
Which step should the solutions architect take to meet these requirements?
A. Increase the backend processing timeout to 30 seconds to match the visibility timeout.
B. Reduce the visibility timeout of the queue to automatically remove the faulty message.
C. Configure a new SQS FIFO queue as a dead-letter queue to isolate the faulty messages.
D. Configure a new SQS standard queue as a dead-letter queue to isolate the faulty messages.
Answer
C. Configure a new SQS FIFO queue as a dead-letter queue to isolate the faulty messages.
Explanation
In this scenario, the solutions architect needs to analyze faulty order messages and ensure that the system continues to process subsequent messages. To achieve this, the architect should configure a new SQS FIFO queue as a dead-letter queue (DLQ) to isolate the faulty messages.
A DLQ is a queue that other (source) queues can target for messages that can’t be processed (consumed) successfully. By configuring a DLQ, the source queue can send messages that can’t be processed to the DLQ for later analysis.
In this scenario, the visibility timeout of the queue is set to 30 seconds, and the backend processing timeout is set to 10 seconds. This means that if a message can’t be processed within 10 seconds, it will become visible in the queue again, and another worker can process it. However, if a message can’t be processed for a longer time, it will block other messages from being processed.
To avoid this situation, the solutions architect should configure a DLQ to isolate the faulty messages. The DLQ will receive the faulty messages, and the source queue will continue processing other messages.
Configuring a new SQS FIFO queue as a DLQ has the following benefits:
- FIFO queues support message groups, which guarantee that all messages within a group are processed in a first-in-first-out (FIFO) manner. This ensures that the order of messages is preserved.
- FIFO queues support dead-letter queues (DLQs) to isolate messages that can’t be processed successfully.
- FIFO queues support content-based deduplication, which ensures that messages with identical content are not delivered again for a specified period.
Therefore, configuring a new SQS FIFO queue as a DLQ is the best solution to meet the requirements.
Amazon AWS Certified Solutions Architect – Professional SAP-C02 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Amazon AWS Certified Solutions Architect – Professional SAP-C02 exam and earn Amazon AWS Certified Solutions Architect – Professional SAP-C02 certification.