DOP-C02 Practice Question 78: SQS Dead Letter Queue Redrive
AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 8 · question 8 of 10
A worker fleet consumes messages from a standard SQS queue. A small percentage of messages contain malformed data that always causes the consumer to throw an exception and let the message become visible again, so those messages are retried forever and crowd out valid messages. The team wants poison messages set aside automatically after a fixed number of failed processing attempts, and to be able to inspect and later replay them once the consumer bug is fixed, without losing any messages.
What should they configure?
Show answer and explanation
Answer:
A dead-letter queue paired with maxReceiveCount is exactly this pattern: once a message's receive count exceeds the configured threshold without being deleted (meaning processing keeps failing), SQS automatically moves it to the associated dead-letter queue instead of redelivering it forever. The messages are preserved, not lost, and can be inspected there. SQS's redrive-to- source capability then lets the team move those messages back to the original queue for reprocessing once the consumer bug is fixed.
Option A only changes how quickly a failing message becomes visible again; it still retries forever and never isolates poison messages.
Option B extends how long messages live in the queue but does nothing to separate malformed messages from healthy ones; they would still be redelivered repeatedly for up to 14 days.
Option D reduces how often the consumer polls, which slows delivery of every message including valid ones, and does not stop a malformed message from eventually being retried indefinitely.
Reference: Amazon SQS dead-letter queues