lucasbru commented on code in PR #15000:
URL: https://github.com/apache/kafka/pull/15000#discussion_r1452363674


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1226,6 +1236,8 @@ private void close(Duration timeout, boolean 
swallowException) {
         closeTimer.update();
         if (applicationEventHandler != null)
             closeQuietly(() -> 
applicationEventHandler.close(Duration.ofMillis(closeTimer.remainingMs())), 
"Failed shutting down network thread", firstException);
+        swallow(log, Level.ERROR, "Failed invoking asynchronous commit 
callback.", this::maybeInvokeCommitCallbacks,

Review Comment:
   @philipnee I moved the invocation of the callbacks here, after closing the 
background thread, to avoid missing a callback that is still completed before 
the shutdown of the background thread. LMK if you had a strong reason to invoke 
the callbacks the last time before stopping the network interaction.



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