You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Shantanu (Jira)" <ji...@apache.org> on 2026/10/16 05:04:00 UTC

[jira] [Assigned] (KAFKA-19651) Thread is not marked interrupted even when AsyncKafkaConsumer.close() throws InterruptException

     [ https://issues.apache.org/jira/browse/KAFKA-19651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shantanu reassigned KAFKA-19651:
--------------------------------

    Assignee: Shantanu

> 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: Shantanu
>            Priority: Major
>              Labels: consumer-threading-refactor
>
> 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)