apoorvmittal10 commented on code in PR #22436:
URL: https://github.com/apache/kafka/pull/22436#discussion_r3339917831
##########
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:
The KIP says following: `The broker does not by default automatically create
DLQ topics, because that again would give a convoluted way of getting the
broker to create a topic with a particular name.` hence why do we want to
default to a topic name?
--
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]