kirktrue commented on code in PR #20521:
URL: https://github.com/apache/kafka/pull/20521#discussion_r2400094079
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessor.java:
##########
@@ -218,32 +242,35 @@ public void process(ApplicationEvent event) {
}
private void process(final PollEvent event) {
+ processPollEvent(event.pollTimeMs());
+ event.markReconcileAndAutoCommitComplete();
+ }
+
+ private void processPollEvent(final long pollTimeMs) {
// Trigger a reconciliation that can safely commit offsets if needed
to rebalance,
// as we're processing before any new fetching starts in the app thread
requestManagers.consumerMembershipManager.ifPresent(consumerMembershipManager ->
consumerMembershipManager.maybeReconcile(true));
if (requestManagers.commitRequestManager.isPresent()) {
CommitRequestManager commitRequestManager =
requestManagers.commitRequestManager.get();
- commitRequestManager.updateTimerAndMaybeCommit(event.pollTimeMs());
+ commitRequestManager.updateTimerAndMaybeCommit(pollTimeMs);
// all commit request generation points have been passed,
// so it's safe to notify the app thread could proceed and start
fetching
Review Comment:
Done.
--
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]