You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/01/14 11:24:00 UTC

[jira] [Updated] (CAMEL-17489) camel-kafka - Unsubscribing fails due to already closed consumer

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

Claus Ibsen updated CAMEL-17489:
--------------------------------
    Summary: camel-kafka - Unsubscribing fails due to already closed consumer  (was: Unsubscribing fails due to already closed consumer)

> camel-kafka - Unsubscribing fails due to already closed consumer
> ----------------------------------------------------------------
>
>                 Key: CAMEL-17489
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17489
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-kafka
>    Affects Versions: 3.14.0
>            Reporter: Rafał Gała
>            Priority: Minor
>
> In {*}KafkaFetchRecords{*}, when an exception occurs inside *startPolling* method, the consumer is closed in finally block:
> {code:java}
> finally {
>     lock.unlock();
>     // only close if not retry
>     if (!isRetrying()) {
>         LOG.debug("Closing consumer {}", threadId);
>         IOHelper.close(consumer);
>     }
> } {code}
>  and then unsibscribing in *run* method fails with "Consumer already closed error"
>  
> {code:java}
> LOG.info("Terminating KafkaConsumer thread: {} receiving from topic: {}", threadId, topicName);
> safeUnsubscribe();
> IOHelper.close(consumer); {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)