AndrewJSchofield commented on code in PR #19865:
URL: https://github.com/apache/kafka/pull/19865#discussion_r2123377334
##########
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:
This doesn't block, does it? Because this has no timeout, doesn't it return
`null` immediately if there is no data?
--
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]