Skip to content

ADR-0242: A dead-letter topic is declared by the broker or mapped by an operator, and a re-drive is a copy ​

  • Status: accepted
  • Date: 2026-12-05
  • Deciders: maintainers
  • Change: openspec/changes/46-kafka-dead-letters-transfer-bulk-tail
  • Amends: ADR-0239 (dead-letter destinations now have two sources)

Context ​

On Artemis the dead-letter address comes from the broker's own address settings (ADR-0239). A Kafka topic is an append-only partitioned log, and the broker knows of a dead-letter topic only where a share group names one (errors.deadletterqueue.topic.name, on recent brokers). Most dead-letter topics on Kafka are a convention of the applications that write them, so an operator needs to say which topic collects for which, and re-driving a record must not remove it.

Decision ​

  • A system that keeps dead-letter topics on a log provides DeadLetterTopics; Kafka's reads the dead-letter topic of each share group into the discovery cache that Artemis already uses, so opening the view reads no broker.
  • An operator may map a dead-letter topic to the topics it collects for (dead_letter_mapping, dead-letter:manage, audited as DEAD_LETTER_MAP and DEAD_LETTER_UNMAP). The view lists both sources, each labelled. Names are never guessed: topics that match *.dlt, *.DLT, *-dlq or dlq.* are offered only as suggestions.
  • The origin of a record is, in order: the openbroker.origin.topic header, kafka_dlt-original-topic, __connect.errors.topic, the mapping's origin when it has exactly one; otherwise it is unresolved, counted and not sent.
  • A re-drive is a copy (ADR-0243) whose targets are resolved per record. Records are never removed from the dead-letter topic. A watermark per partition is advanced only by a run over a whole range; a preview that overlaps it carries the warning redrive-overlap, which is acknowledged and is not a refusal.

Consequences ​

  • Kafka's Dead letters view works on every broker version: the mapping covers the ones that report nothing.
  • A re-driven record keeps its dead-letter headers, so a second re-drive resolves it the same way.
  • Re-driving the same span twice sends its records twice; the preview says so before it happens.

Alternatives considered ​

  • Guess the dead-letter topics from their names. A wrong guess re-drives records into the wrong topic.
  • Delete re-driven records. A log cannot remove a record, and a watermark is honest about that.
  • Only broker-declared topics. Recent brokers only, and few installations use share groups.

Apache-2.0. Apache Kafka, Apache ActiveMQ and Apache ActiveMQ Artemis are trademarks of the Apache Software Foundation. RabbitMQ is a trademark of its owner. Rahdar is an independent project, not produced by, endorsed by, or affiliated with the ASF or the owner of RabbitMQ.