KAFKA-20410: Add DLQ configuration parameters for Share Groups (KIP-1191)#21979
Open
sjhajharia wants to merge 2 commits intoapache:trunkfrom
Open
KAFKA-20410: Add DLQ configuration parameters for Share Groups (KIP-1191)#21979sjhajharia wants to merge 2 commits intoapache:trunkfrom
sjhajharia wants to merge 2 commits intoapache:trunkfrom
Conversation
dajac
reviewed
Apr 7, 2026
| /** Dead Letter Queue Configurations (KIP-1191) **/ | ||
|
|
||
| // Cluster-level DLQ configs | ||
| public static final String ERRORS_DEADLETTERQUEUE_AUTO_CREATE_TOPICS_ENABLE_CONFIG = "errors.deadletterqueue.auto.create.topics.enable"; |
Member
There was a problem hiding this comment.
All configs starts with the same prefix. Why don’t we follow the same pattern for those?
Collaborator
Author
There was a problem hiding this comment.
We are intentionally not including the group.share. prefix on these configs to keep them generic enough so that in the future, we can re-use them as and when needed and maintain compatibility still.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the configuration foundation for Share Groups Dead-Letter
Queue (DLQ) functionality as specified in KIP-1191: Dead-letter queues
for share
groups.
Changes
New Configurations
Cluster-level configs (ShareGroupConfig.java):
errors.deadletterqueue.auto.create.topics.enable(default:false)errors.deadletterqueue.topic.name.prefix(default:"dlq.")Group-level configs (ShareGroupConfig.java):
errors.deadletterqueue.topic.name(default:"")errors.deadletterqueue.copy.record.enable(default:false)true: Copy full original record to DLQfalse: Copy only context metadata (offset, delivery count,reason)
Topic-level config (TopicConfig.java):
errors.deadletterqueue.group.enable(default: not set)Validation Logic
__(reserved for internaltopics)
errors.deadletterqueue.auto.create.topics.enable=true, thetopic name must start with the configured prefix
name (no prefix requirement)
"") is valid and indicates DLQ is disabledTests
Added 7 comprehensive test cases in
ShareGroupConfigTest:testDLQConfigDefaults()- Verify default valuestestDLQConfigCustomValues()- Validate custom configurationstestDLQTopicNameCannotStartWithDoubleUnderscore()- Reject__prefix
testDLQTopicNameMustMatchPrefixWhenAutoCreateEnabled()- Enforceprefix with auto-create
testDLQTopicNamePrefixNotRequiredWhenAutoCreateDisabled()- Allowany name without auto-create
testDLQBlankTopicNameIsValid()- Accept blank as "DLQ disabled"testDLQValidTopicNameWithAutoCreate()- Validate correctconfiguration
Reviewers: David Jacot david.jacot@gmail.com