jeffkbkim commented on code in PR #17653:
URL: https://github.com/apache/kafka/pull/17653#discussion_r1825003698
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/consumer/ConsumerGroup.java:
##########
@@ -334,6 +342,13 @@ private void removeStaticMember(ConsumerGroupMember
oldMember) {
}
}
+ /**
+ * @return The number of members subscribed to the provided regex.
+ */
+ public int numSubscribedMembers(String regex) {
+ return subscribedRegularExpressions.getOrDefault(regex, 0);
+ }
Review Comment:
from PR description
> This will be useful to know whether a regex is new in the group or whether
a regex must be removed from the group.
reducing the list of subscribed regex is helpful when performing pattern
matching for updated topic metadata, is this correct?
are there any other benefits this brings?
--
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]