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


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1278,12 +1278,10 @@ void prepareShutdown(final Timer timer, final 
AtomicReference<Throwable> firstEx
             autoCommitSync(timer);
 
         applicationEventHandler.add(new CommitOnCloseEvent());
-        completeQuietly(
-            () -> {
-                maybeRevokePartitions();
-                applicationEventHandler.addAndGet(new 
LeaveOnCloseEvent(calculateDeadlineMs(timer)));
-            },
-            "Failed to send leaveGroup heartbeat with a timeout(ms)=" + 
timer.timeoutMs(), firstException);
+        completeQuietly(() -> maybeRevokePartitions(),

Review Comment:
   You got it right, in this case the legacy consumer won't send a leave group 
either. We discussed it with @dajac and it seemed right to ensure the new 
consumer leaves on close (even if the callbacks fail). No changes on the legacy 
for now though (would require more thought).



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