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


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumerImpl.java:
##########
@@ -519,12 +518,10 @@ public void subscribe(final Collection<String> topics) {
                 }
 
                 log.info("Subscribed to topic(s): {}", String.join(", ", 
topics));
-                if (subscriptions.subscribeToShareGroup(new HashSet<>(topics)))
-                    metadata.requestUpdateForNewTopics();
 
                 // Trigger subscribe event to effectively join the group if 
not already part of it,
                 // or just send the new subscription to the broker.
-                applicationEventHandler.add(new 
ShareSubscriptionChangeEvent());
+                applicationEventHandler.addAndGet(new 
ShareSubscriptionChangeEvent(topics));

Review Comment:
   I agree, and suggest we change it consistently in the other 2 consumers too, 
all have the exact same message with "inverted" order of log/action.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to