You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Kirk True (Jira)" <ji...@apache.org> on 2025/08/28 18:01:00 UTC
[jira] [Created] (KAFKA-19651) Thread is not marked interrupted even when AsyncKafkaConsumer.close() throws InterruptException
Kirk True created KAFKA-19651:
---------------------------------
Summary: Thread is not marked interrupted even when AsyncKafkaConsumer.close() throws InterruptException
Key: KAFKA-19651
URL: https://issues.apache.org/jira/browse/KAFKA-19651
Project: Kafka
Issue Type: Bug
Components: clients, consumer
Affects Versions: 4.1.0
Reporter: Kirk True
Assignee: Kirk True
There is a unit tests which perform these steps:
# Create consumer
# Interrupt thread
# Call Consumer.close()
# Check that InterruptException was thrown
# Call Thread.interrupted()
In those cases, the return value from Thread.interrupted() is actually false. We're catching the interrupted in the close() method but not restoring it before we throw. This is inconsistent with the ClassicKafkaConsumer.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)