lianetm commented on code in PR #16031:
URL: https://github.com/apache/kafka/pull/16031#discussion_r1626188794
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1280,7 +1280,7 @@ void prepareShutdown(final Timer timer, final
AtomicReference<Throwable> firstEx
if (autoCommitEnabled)
autoCommitSync(timer);
- applicationEventHandler.add(new CommitOnCloseEvent());
+ applicationEventHandler.add(new
CommitOnCloseEvent(calculateDeadlineMs(timer)));
Review Comment:
I don't quite get why we need this event as completable with a deadline. We
issued a blocking commit sync above on ln 1281 (that one needs deadline, and it
has it from the timer, and will be expired if needed etc.). But this
`CommitOnCloseEvent` is only flipping a flag in the commit manager to not allow
any more commits
([this](https://github.com/apache/kafka/blob/55d38efcc5505a5a1bddb08ba05f4d923f8050f9/clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java#L187)).
I may be missing something, but this is not the kind of event that needs a
deadline to complete or be reaped (aka. CompletableApplicationEvent)
--
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]