← All Quizzes
What is a dead letter queue (DLQ) and when is it used?
Explanation
A dead letter queue (DLQ) is a messaging pattern where messages that cannot be processed successfully after a specified number of attempts are moved to a separate queue. This prevents poison messages from blocking the main queue and allows for investigation, debugging, and potential reprocessing. DLQs are common in message brokers (RabbitMQ, AWS SQS, Kafka) and event-driven architectures. Messages in the DLQ can be inspected for error causes, fixed, and requeued if appropriate.