dajac commented on code in PR #17964: URL: https://github.com/apache/kafka/pull/17964#discussion_r1862304336
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMetadata.java: ########## @@ -68,7 +68,7 @@ public boolean allowAutoTopicCreation() { @Override public synchronized MetadataRequest.Builder newMetadataRequestBuilder() { - if (subscription.hasPatternSubscription()) + if (subscription.hasPatternSubscription() || subscription.hasRe2JPatternSubscription()) Review Comment: Ouch. It is not supposed to work like this. One of the main benefit of moving the regex to the server side is actually to avoid those "request all metadata" requests. We should be able to only request the metadata of the assigned topic ids regardless of whether the consumer subscribed via names or regex. Of course, the local regex resolution requires this. I understand that it is a limitation of the current implementation of the subscription because it seems that we request based on the subscribed topic names in the subscription state. I suppose that it is not possible to change this in this PR. However, we should file a jira (if not already done) to refactor the subscription state for the new consumer. What do you think? -- 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