chia7712 commented on code in PR #17964:
URL: https://github.com/apache/kafka/pull/17964#discussion_r1862550582


##########
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:
   > One of the main benefit of moving the regex to the server side is actually 
to avoid those "request all metadata" requests.
   
   Let's try to imagine the solution. When users are using server-side regex, 
`ConsumerMetadata` needs to send a `MetadataRequest` to request only node 
information (for the coordinator). Then, `ConsumerHeartbeatRequestManager` uses 
the heartbeat to obtain assignments from the coordinator. Finally, 
`ConsumerMetadata` can generate a `MetadataRequest` with the correct topic IDs. 
Is this correct?



-- 
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