dajac commented on code in PR #13901:
URL: https://github.com/apache/kafka/pull/13901#discussion_r1245209953
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -874,4 +1021,34 @@ public void replay(
consumerGroup.updateMember(newMember);
}
}
+
+ /**
+ * A new metadata image is available.
+ *
+ * @param newImage The new metadata image.
+ * @param delta The delta image.
+ */
+ public void onNewMetadataImage(MetadataImage newImage, MetadataDelta
delta) {
+ metadataImage = newImage;
+
+ // Notify all the groups subscribed to the created, updated or
Review Comment:
> Is created topics a different method in topicsDelta? Shouldn't we have
createdTopicIds and we add them? Or is changedTopics accounting for that? Are
there other changes besides topic creation we can have?
My understanding is that created topics are included in the changed topics
as well.
> I guess my question then is what is the flow for updating the groups with
the image? This will just happen on the next heartbeat since we set
metadataImage to new image?
Right. The idea is to flag all the groups subscribed topics and to let them
update themselves on the next heartbeat. I did it this way because we can also
rely on this mechanism to refresh regex based subs every X minutes later on.
--
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]