How to handle RebalanceInProgressException thrown in commitSync()/commitAsync with CooperativeStickyAssignor
Issue
- How to handle RebalanceInProgressException thrown in commitSync()/commitAsync with CooperativeStickyAssignor
- How to enable cooperative rebalancing(CooperativeStickyAssignor) for consumers
- After changing to CooperativeStickyAssignor, during consumer rebalance, RebalanceInProgressException sometimes occurs and any multiple Kafka clients in that consumer group can stop. Then this also leads to duplicate processing of uncommitted messages. RebalanceInProgressException can be thrown even if Kafka consumers have not changed their partition assignments during consumer rebalance.
org.apache.kafka.common.errors.RebalanceInProgressException: Offset commit cannot be completed since the consumer is
undergoing a rebalance for auto partition assignment. You can try completing the rebalance by calling poll() and then
retry the operation.
Environment
- Red Hat AMQ Streams 2.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.