FrankYang0529 commented on code in PR #17199: URL: https://github.com/apache/kafka/pull/17199#discussion_r1850073759
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventHandler.java: ########## @@ -39,29 +43,36 @@ * An event handler that receives {@link ApplicationEvent application events} from the application thread which * are then readable from the {@link ApplicationEventProcessor} in the {@link ConsumerNetworkThread network thread}. */ +@SuppressWarnings("this-escape") public class ApplicationEventHandler implements Closeable { private final Logger log; + private final Time time; private final BlockingQueue<ApplicationEvent> applicationEventQueue; private final ConsumerNetworkThread networkThread; private final IdempotentCloser closer = new IdempotentCloser(); + private final Optional<KafkaAsyncConsumerMetrics> kafkaAsyncConsumerMetrics; public ApplicationEventHandler(final LogContext logContext, final Time time, final BlockingQueue<ApplicationEvent> applicationEventQueue, final CompletableEventReaper applicationEventReaper, final Supplier<ApplicationEventProcessor> applicationEventProcessorSupplier, final Supplier<NetworkClientDelegate> networkClientDelegateSupplier, - final Supplier<RequestManagers> requestManagersSupplier) { + final Supplier<RequestManagers> requestManagersSupplier, + final Optional<KafkaAsyncConsumerMetrics> kafkaAsyncConsumerMetrics) { this.log = logContext.logger(ApplicationEventHandler.class); + this.time = time; this.applicationEventQueue = applicationEventQueue; + this.kafkaAsyncConsumerMetrics = kafkaAsyncConsumerMetrics; this.networkThread = new ConsumerNetworkThread(logContext, time, - applicationEventQueue, + this, Review Comment: Revert the change. Create a followup Jira: https://issues.apache.org/jira/browse/KAFKA-18048. -- 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