デッドレターキュー (DLQ) は、メッセージが処理できないか、特定の条件を満たす場合(拒否された、期限切れ、キューが満杯など)に、メッセージが送られる場所です。DLQは問題のあるメッセージが失われたり処理をブロックしたりすることを防ぎ、後で検査と処理ができるようにします。
デッドレターキューとは
DEAD LETTER QUEUE → a queue that receives messages that couldn't be delivered/processed
normally:
→ messages are "dead-lettered" (routed to the DLQ) when they:
- are REJECTED/nacked (consumer can't process them) without requeue
- EXPIRE (message TTL exceeded)
- exceed the queue's MAX LENGTH (overflow)
→ the DLQ collects these for inspection/handling instead of losing them
→ a "holding area" for problematic messages
