Phuc-Hong-Tran commented on code in PR #15585:
URL: https://github.com/apache/kafka/pull/15585#discussion_r1556146632
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1750,8 +1750,8 @@ private void subscribeInternal(Pattern pattern,
Optional<ConsumerRebalanceListen
throwIfNoAssignorsConfigured();
log.info("Subscribed to pattern: '{}'", pattern);
subscriptions.subscribe(pattern, listener);
- updatePatternSubscription(metadata.fetch());
metadata.requestUpdateForNewTopics();
+ updatePatternSubscription(metadata.fetch());
Review Comment:
@kirktrue It actually not necessary, it just happened that in the one of the
code preview sections of this PR, the call `metadata.requestUpdateForNewTopics`
appeared right after `subscriptions.subscribe(pattern, listener)` so I thought
the call was previously there, but I also find that it seems more logical to
request for metadata update right after we establish the new pattern in
`subscriptions`
--
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]