You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Pavel Borik (Jira)" <ji...@apache.org> on 2025/04/22 13:02:00 UTC

[jira] [Created] (CAMEL-22004) Kafka component shutdown may get stuck when rebalancing occurs

Pavel Borik created CAMEL-22004:
-----------------------------------

             Summary: Kafka component shutdown may get stuck when rebalancing occurs
                 Key: CAMEL-22004
                 URL: https://issues.apache.org/jira/browse/CAMEL-22004
             Project: Camel
          Issue Type: Bug
          Components: camel-kafka
    Affects Versions: 4.11.0, 4.8.6
            Reporter: Pavel Borik


[Zulip chat thread|https://camel.zulipchat.com/#narrow/channel/257298-camel/topic/Kafka.20component.20fails.20to.20shutdown.20after.20repartitioning]

KafkaFetchRecords instance holds a reference to the Consumer from kafka-clients. When the rebalancing event occurs after the pause call has already been issued (as a part of doSuspend call in KafkaConsumer), the topic partition states which are held in the SubscriptionState object inside of kafka-clients Consumer instance are replaced by the new assignment and the pause flag is therefore lost.

Kafka component may then be stuck in accepting new messages (notifying about pending exchanges) instead of finishing current processing and completing the shutdown.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)