Monedula
Kafka guide contents

Markdown

Part VI · Reference

Kafka Improvement Proposal

KIP-1191: a dead-letter queue for share groups

Consumer groups and queues · Shipped · since Kafka 4.4 · status checked November 2026

KIP-1191 gives share groups a dead-letter queue. When a record is rejected or runs out of delivery attempts, the broker writes it to a dead-letter topic before archiving it, so the failed message can be inspected or replayed later instead of silently disappearing from the queue.

Proposal
KIP-1191, Dead-letter queues for share groups
Status
Shipped New in Kafka 4.4, opt-in per share group.
Area
Consumer groups and queues
Dead letter in dlq.orders. The broker wrote offset 0 to dlq.orders partition 0 at offset 0: no key or value, only __dlq.errors headers naming group sg1, topic orders, partition 0, offset 0, delivery count 3 and the reason, Offset delivery count exceeded the threshold. Only then is it ARCHIVED, and SPSO moves to 3. Open this step in the full playground

Why it was needed

Share groups (KIP-932) stop a poison message from looping forever: after group.share.delivery.count.limit attempts, or when a consumer rejects it, the record is archived and never delivered again. But archived meant gone from the group's point of view. Every team had to build its own dead-letter handling in the consumer, which is exactly the part that tends to fail along with the processing.

What it changes

A share group can be given a dead-letter topic. When a record is rejected, or released once too often, the broker writes a dead-letter record to that topic before archiving the original. By default the dead-letter record holds only headers: the group, topic, partition, offset, delivery count and why it failed. A group setting adds a copy of the original key and value. If the write fails, for example because the topic does not exist, the record is archived anyway.

How to use it

  • Set the group config errors.deadletterqueue.topic.name to the dead-letter topic; set errors.deadletterqueue.copy.record.enable=true to keep the key and value too.
  • The topic name must start with the cluster prefix errors.deadletterqueue.topic.name.prefix (dlq. by default), and the topic needs errors.deadletterqueue.group.enable=true. Create it first unless errors.deadletterqueue.auto.create.topics.enable is on.
  • The feature needs share.version=2 on the cluster.

Where it stands

Shipped in Apache Kafka 4.4. It is off until a group is given a dead-letter topic, and it needs the cluster on share.version=2.

What comes next

Replaying from the dead-letter topic back into the main topic is left to tools and applications for now.

See it in the simulator

Sources

All Kafka KIPs