AndrewJSchofield commented on code in PR #14835: URL: https://github.com/apache/kafka/pull/14835#discussion_r1406853731
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManager.java: ########## @@ -417,4 +394,127 @@ private void updateHeartbeatIntervalMs(final long heartbeatIntervalMs) { this.heartbeatTimer.updateAndReset(heartbeatIntervalMs); } } + + /** + * Builds the heartbeat requests correctly, ensuring that all information is sent according to + * the protocol, but subsequent requests do not send information which has not changed. This + * is important to ensure that reconciliation completes successfully. + */ + static class HeartbeatState { + private final SubscriptionState subscriptions; + private final MembershipManager membershipManager; + private final int rebalanceTimeoutMs; + + // Fields of ConsumerHeartbeatRequest sent in the most recent request + private String sentInstanceId; + private int sentRebalanceTimeoutMs; + private TreeSet<String> sentSubscribedTopicNames; + // private String sentSubscribedTopicRegex; + private String sentServerAssignor; + private TreeSet<String> sentTopicPartitions; Review Comment: Done -- 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