AndrewJSchofield opened a new pull request, #14912:
URL: https://github.com/apache/kafka/pull/14912

   The Kafka consumer makes a variety of requests to brokers such as fetching 
committed offsets and updating metadata. In the `LegacyKafkaConsumer`, the 
approach is typically to prepare RPC requests and then poll the network to wait 
for responses. In the `AsyncKafkaConsumer`, the approach is to enqueue an 
`ApplicationEvent` for processing by one of the request managers on the 
background thread. However, it is still important to wait for responses rather 
than spinning enqueuing events for the request managers before they have had a 
chance to respond.
   
   In general, the behaviour will not be changed by this code. The 
`PlaintextConsumerTest.testSeek` test was flaky because operations such as 
`KafkaConsumer.position` were not properly waiting for a response which meant 
that subsequent operations were being attempted in the wrong state. This test 
is no longer flaky.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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

Reply via email to