dajac commented on code in PR #17653:
URL: https://github.com/apache/kafka/pull/17653#discussion_r1827412960


##########
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:
   @jeffkbkim Yeah, the goal is to update the regex once for the entire group 
if it is used by multiple members. This data structure helps to de-duplicate 
for sure.



-- 
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]

Reply via email to