smjn commented on code in PR #22436:
URL: https://github.com/apache/kafka/pull/22436#discussion_r3340025946
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/share/ShareGroupConfigProvider.java:
##########
@@ -98,4 +98,17 @@ public ShareGroupAutoOffsetResetStrategy
autoOffsetReset(String groupId) {
.flatMap(GroupConfig::shareAutoOffsetReset)
.orElseGet(GroupConfig::defaultShareAutoOffsetReset);
}
+
+ /**
+ * The method is used to get the name of the configured DLQ topic on the
share group. If the group config
+ * is present, then the value from the group config is used. Otherwise,
the default value is used.
+ *
+ * @param groupId The group id for which the DLQ topic name is to be
fetched.
+ * @return DLQ topic name for the share group.
+ */
+ public String errorsDLQTopicName(String groupId) {
+ return manager.groupConfig(groupId)
+ .map(GroupConfig::errorsDLQTopicName)
+ .orElse(GroupConfig.ERRORS_DEADLETTERQUEUE_TOPIC_NAME_DEFAULT); //
In case no group config
Review Comment:
@apoorvmittal10 Thanks for the review - the default is just a SENTINEL - its
an empty String `""`. We have the check in `SharePartition` which looking at
empty name does not invoke ARCHIVING flow.
DLQ topic auto creation is controlled via
`errors.deadletterqueue.auto.create.topics.enable`. But both in case of this
config being enabled for disabled - user needs to provide a DLQ topic name for
a share group on which they want to invoke the DLQ flow. We do not create the
topic, if config is set, unless it is specified on the group.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]