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:25:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17476074#comment-17476074 ] 

Claus Ibsen commented on CAMEL-17489:
-------------------------------------

Can you post the stractrace / error you see from the logs

> 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)