philipnee commented on code in PR #14680: URL: https://github.com/apache/kafka/pull/14680#discussion_r1388420510
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/PrototypeAsyncConsumer.java: ########## @@ -712,6 +729,10 @@ private void close(Duration timeout, boolean swallowException) { if (applicationEventHandler != null) closeQuietly(() -> applicationEventHandler.close(timeout), "Failed to close application event handler with a timeout(ms)=" + timeout, firstException); + // Invoke all callbacks after the background thread exists in case if there are unsent async + // commits + maybeInvokeCallbacks(); Review Comment: When the consumer is closing, we don't really need to throw a fenced id exception, because when the consumer is fenced we want the consumer to close right? To your second question: yes, the work is inflight, KAFKA-15327. -- 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