lianetm commented on code in PR #17694:
URL: https://github.com/apache/kafka/pull/17694#discussion_r1831210805
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/consumer/ConsumerGroup.java:
##########
@@ -342,6 +348,46 @@ private void removeStaticMember(ConsumerGroupMember
oldMember) {
}
}
+ /**
+ * Update the resolved regular expression.
+ *
+ * @param regex The regular expression.
+ * @param newResolvedRegularExpression The regular expression's metadata.
+ */
+ public void updateResolvedRegularExpression(
+ String regex,
+ ResolvedRegularExpression newResolvedRegularExpression
+ ) {
+ removeResolvedRegularExpression(regex);
+ if (newResolvedRegularExpression != null) {
+ resolvedRegularExpressions.put(regex,
newResolvedRegularExpression);
+ newResolvedRegularExpression.topics.forEach(topicName ->
subscribedTopicNames.compute(topicName, Utils::incValue));
Review Comment:
doing this here means that a regex received in a HB will be considered as
having no subscribers until we resolve it (and replay), vs. inc the counter
when we receive the HB. Is this intentional? I see the point on both
approaches.. just thinking if this "gap" in time for accounting the subscriber
could have some side-effects...
--
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]