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


##########
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:
   That's the main gain as I see it, and it's a critical one, but we can also 
leverage this counter in the future when defining the strategies to re-eval all 
regular expressions (ie. we could decide to re-eval the "most used" first based 
on this subscribers count) 



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