Kirk True created KAFKA-17519: --------------------------------- Summary: Review intended behavior of Consumer.close() and its timeout on interrupt Key: KAFKA-17519 URL: https://issues.apache.org/jira/browse/KAFKA-17519 Project: Kafka Issue Type: Bug Components: clients, consumer Affects Versions: 3.9.0 Reporter: Kirk True
The repercussions of a thread's interrupt status on {{Consumer.close()}} and its timeout is not well defined. It _appears_ that the {{ClassicKafkaConsumer}} will continue to attempt to close all its resources even if an interrupt was triggered prior to—or during—the call to {{close()}} though it effectively ignores the user's supplied timeout since each call to {{NetworkClient.poll()}} will throw an {{InterruptException}} after first making an attempt to poll the socket. The task here is to review the existing code, verify the behavior with some unit/integration tests, and document it. Furthermore, once the intended behavior has been confirmed, the {{AsyncKafkaConsumer}} should be updated to behave likewise. -- This message was sent by Atlassian Jira (v8.20.10#820010)