kirktrue commented on code in PR #16686:
URL: https://github.com/apache/kafka/pull/16686#discussion_r1833340777


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1265,30 +1343,56 @@ private void close(Duration timeout, boolean 
swallowException) {
         }
     }
 
-    /**
-     * Prior to closing the network thread, we need to make sure the following 
operations happen in the right sequence:
-     * 1. autocommit offsets
-     * 2. release assignment. This is done via a background unsubscribe event 
that will
-     * trigger the callbacks, clear the assignment on the subscription state 
and send the leave group request to the broker
-     */
-    private void releaseAssignmentAndLeaveGroup(final Timer timer) {
+    private void autoCommitOnClose(final Timer timer) {
         if (!groupMetadata.get().isPresent())
             return;
 
         if (autoCommitEnabled)
             commitSyncAllConsumed(timer);
 
         applicationEventHandler.add(new CommitOnCloseEvent());
+    }
+
+    private void releaseAssignmentOnClose(final Timer timer) {

Review Comment:
   Renamed to `runRebalanceCallbacksOnClose()` as suggested 👍 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to