lianetm commented on code in PR #14690: URL: https://github.com/apache/kafka/pull/14690#discussion_r1382728096
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManager.java: ########## @@ -172,10 +223,14 @@ private NetworkClientDelegate.UnsentRequest makeHeartbeatRequest() { membershipManager.groupInstanceId().ifPresent(data::setInstanceId); - if (this.subscriptions.hasPatternSubscription()) { - // TODO: Pass the string to the GC if server side regex is used. - } else { - data.setSubscribedTopicNames(new ArrayList<>(this.subscriptions.subscription())); + // Send subscription to the broker only if it has changed + if (sendUpdatedSubscription) { Review Comment: Makes sense, I will include the changes for the stateful builder with the initial approach, and that should be a solid ground to tune it afterwards and send only what's needed -- 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