Skip to content
Kafka Is Fun

BeginnerOperations

What is a dead letter queue (DLT) in Kafka?

Reference answer

A dead letter queue (dead letter topic, DLT) is a topic that receives records that could not be processed, so one bad record does not block the rest. Plain Kafka consumers have no built-in DLQ; it is a pattern you or a framework implement. Apache Kafka components that support it: for Kafka Connect sink connectors, set errors.tolerance=all and errors.deadletterqueue.topic.name; errors.deadletterqueue.context.headers.enable=true adds headers (prefixed __connect.errors.) describing the error. In Kafka Streams, errors.dead.letter.queue.topic.name makes the default exception handler send a dead letter record to that topic. In Spring for Apache Kafka (reference 4.1.1), DeadLetterPublishingRecoverer used with DefaultErrorHandler publishes the failed record, after the configured retries, to a topic named <original>-dlt by default, in the same partition, with headers carrying the exception and the original topic, partition and offset.

Expected key concepts: dead letter topic, DLT, DLQ, errors.tolerance, errors.deadletterqueue.topic.name, errors.dead.letter.queue.topic.name, DeadLetterPublishingRecoverer, DefaultErrorHandler, headers, retries

How did that feel?

Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.