AWS Certified SysOps Administrator – AssociateReliability and Business ContinuityEasy

A development team uses an Amazon SQS queue for asynchronous processing of orders. Due to a bug in the processing application, some messages are being consistently rejected and returned to the queue, causing a processing loop. The team needs a mechanism to isolate these problematic messages for later inspection and prevent them from blocking the processing of valid messages. Which SQS feature should the SysOps Administrator implement?

  1. AImplement batch message processing.
  2. BConfigure a Dead-Letter Queue (DLQ) for the SQS queue.
  3. CIncrease the visibility timeout of the SQS queue.
  4. DUse SQS FIFO queues instead of standard queues.
Show answer & explanation

Correct answer: B. Configure a Dead-Letter Queue (DLQ) for the SQS queue.

A Dead-Letter Queue (DLQ) is designed for exactly this scenario. When a message fails to be processed successfully after a specified number of retries (the `maxReceiveCount`), SQS automatically moves it to the DLQ. This isolates problematic messages, prevents processing loops, and allows for later debugging without affecting the main queue.

Why the other options are wrong

  • A. Implementing batch message processing can improve efficiency but doesn't address the issue of individual messages consistently failing and causing processing loops.
  • C. Increasing the visibility timeout might temporarily prevent messages from reappearing too quickly but doesn't solve the core problem of messages being consistently rejected and looping.
  • D. SQS FIFO queues guarantee message ordering and exactly-once processing but do not inherently solve the problem of messages being rejected and looping; a DLQ is still needed for such scenarios.

SQS Dead-Letter Queue (DLQ)

An Amazon SQS Dead-Letter Queue stores messages that an application fails to process successfully after a specified number of attempts, preventing processing loops and isolating problematic messages.

  • Isolates unprocessable messages.
  • Prevents messages from re-entering the main queue indefinitely.
  • Allows for later inspection and debugging.
  • Configured with a `maxReceiveCount` threshold.

Memory trick: DLQ: The 'reject' bin for SQS messages that just won't behave.

More Reliability and Business Continuity questions