lianetm commented on code in PR #16974:
URL: https://github.com/apache/kafka/pull/16974#discussion_r1733231893


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractHeartbeatRequestManager.java:
##########
@@ -195,6 +197,32 @@ public NetworkClientDelegate.PollResult poll(long 
currentTimeMs) {
      */
     public abstract AbstractMembershipManager<R> membershipManager();
 
+    /**
+     * Generate a heartbeat request to leave the group if the state is still 
LEAVING when this is
+     * called to close the consumer.

Review Comment:
   There couldn't be a previous leave request, given that the state is 
LEAVING/PREPARE_LEAVING (basically the state machine controls that, when 
leaving, it transitions to UNSUBSCRIBED as soon as the request is sent, 
[here](https://github.com/apache/kafka/blob/62dc982ce9ce76b299a628d50648e3529fd88e63/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractMembershipManager.java#L646))



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