kirktrue commented on code in PR #20521:
URL: https://github.com/apache/kafka/pull/20521#discussion_r2407114346
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessor.java:
##########
@@ -726,6 +757,57 @@ private void process(final
StreamsOnAllTasksLostCallbackCompletedEvent event) {
requestManagers.streamsMembershipManager.get().onAllTasksLostCallbackCompleted(event);
}
+ private void process(final CompositePollEvent event) {
+ CompositePollEventProcessorContext context =
compositePollContext.orElseThrow(IllegalArgumentException::new);
+ ApplicationEvent.Type nextEventType = event.startingEventType();
+
+ if (context.maybeCompleteExceptionally(event) ||
context.maybeCompleteWithCallbackRequired(event, nextEventType))
+ return;
+
+ if (nextEventType == ApplicationEvent.Type.POLL) {
+ log.debug("Processing {} logic for {}", nextEventType, event);
+ processPollEvent(event.pollTimeMs());
+ nextEventType = ApplicationEvent.Type.UPDATE_SUBSCRIPTION_METADATA;
+
+ if (context.maybeCompleteExceptionally(event) ||
context.maybeCompleteWithCallbackRequired(event, nextEventType))
Review Comment:
I was able to make `AsyncPollEvent` hook into the mechanism in
`ConsumerNetworkThread` that checks for metadata errors so that the explicit
checks that were in the `ApplicationEventProcessor` are now removed . PTAL.
Thanks!
--
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]