What a dead-letter queue is for
In Amazon SQS, a redrive policy on a source queue names a dead-letter queue and a maximum receive count. A message received more times than that count without being deleted is moved to the dead-letter queue instead of being retried again.
Without that policy, a message that always fails keeps coming back until its retention period ends, and then it is deleted.
Checks when failed messages do not show up
Work from the source queue outwards.
- Does the source queue have a redrive policy at all, and does it name the queue you are looking at?
- Is the dead-letter queue the same type as the source: standard with standard, FIFO with FIFO?
- Is the dead-letter queue's retention period long enough for someone to look before messages expire there too?
- If a consumer reads in batches, does it report partial failures, or does one bad message fail the whole batch?
Containment is only half of it
A dead-letter queue that fills up silently is a slower way of losing messages. Put an alarm on its depth so that the first failed message reaches a person.