An Amazon SQS queue buffers ETL tasks for workers, but malformed tasks repeatedly fail and consume processing capacity. How should the engineer isolate persistent failures while allowing transient failures to be retried?
Show the answer
Correct answerA. Configure a dead-letter queue with a suitable maxReceiveCount.
AWhy this is right: A redrive policy moves repeatedly received messages to a dead-letter queue after the configured threshold.
BWhy not this: Deleting before processing risks losing tasks if a worker fails and prevents retries.
CWhy not this: A longer visibility timeout delays retries but does not remove persistently failing messages from normal processing.
DWhy not this: Longer retention preserves messages longer but does not isolate repeatedly failing tasks.
A dead-letter queue isolates messages after a configured number of unsuccessful receives, preserving retries for transient failures. Increasing visibility timeout delays redelivery but does not isolate persistently failing messages.