dajac commented on code in PR #19865:
URL: https://github.com/apache/kafka/pull/19865#discussion_r2123013260


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java:
##########
@@ -176,6 +181,15 @@ void runOnce() {
      */
     private void processApplicationEvents() {
         LinkedList<ApplicationEvent> events = new LinkedList<>();
+
+        if (!networkClientDelegate.hasAnyPendingRequests()) {
+            // If we don't have any outstanding network requests, we can park 
here until the next event comes.
+            ApplicationEvent head = applicationEventQueue.poll();

Review Comment:
   Are you sure about this? My understanding is that the thread won't be able 
to process any inbound packets/bytes if they arrive before a new event comes in 
here to unblock it.



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

Reply via email to