dajac commented on PR #16686: URL: https://github.com/apache/kafka/pull/16686#issuecomment-2413298774
@chia7712 @hachikuji For the context, we actually discovered this difference between the old and the new consumer while running large scale tests to compare the old protocol and the new protocol. Those tests are based on Trogdor (ConsumeBenchWorker). I agree that the consumer may not leave when close(0) is called but the core issue is different. When the Consumer is executed in a Thread (e.g. an executor), when the thread is interrupted, poll() throws the InterruptException exception and we interrupt the thread again to preserve the flag if not mistaken. Then, if you try to close the consumer or to unsubscribe to cleanly leave the group, the old consumer works because there are no interrupt checks on those paths whereas the new one fails short because calling get() (e.g. on a future) will thrown an interrupt exception again. This is where the difference is. -- 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