lianetm commented on code in PR #15585: URL: https://github.com/apache/kafka/pull/15585#discussion_r1555969469
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java: ########## @@ -1751,16 +1753,7 @@ private void subscribeInternal(Pattern pattern, Optional<ConsumerRebalanceListen throwIfNoAssignorsConfigured(); log.info("Subscribed to pattern: '{}'", pattern); subscriptions.subscribe(pattern, listener); - metadata.requestUpdateForNewTopics(); Review Comment: This line with the request for metadata I expect is needed, otherwise we'll never resolve the topics. The poll loop is only responsible for updating the pattern subscription when new topics are discovered, but it is the responsibility of the call to subscribe to request the metadata update (exactly what the legacy consumer does). This is btw tested in one of the integration tests, the one that sets the metadata age to a large value, to validate that it is indeed the call to subscribe the one that triggers the metadata refresh. I expect that test should be failing without this line here. -- 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