Skip to content

Conversation

@filimonov
Copy link
Contributor

@filimonov filimonov commented Jun 1, 2021

When the consumer enters the group and gets no assignment (for ex. there is not enough partitions in the topic),
librdkafka waits for the rebalancing sequence to be finished by calling assign with the empty list of partitions
(just as was passed by librdkafka to rebalance callback).

But cppkafka pass nullptr instead (which means unassign). And consumer stuck forever in that
state, not being able to pick the partition during the next rebalance (failover), because the previous rebalance sequence
was not finished.

Fixes #273 , ClickHouse/ClickHouse#21118 , etc.

When the consumer enters the group and gets no assignment (for ex. there is not enough partitions in the topic),
librdkafka waits for the rebalancing sequence to be finished by calling assign with the empty list of partitions
(just as was passed by librdkafka to rebalance callback).

But cppkafka instead pass nullptr instead of an empty list (which means unassign). And consumer stuck forever in that
state, not being able to pick the partition during the next rebalance (failover), because the previous rebalance sequence
was not finished.

Fixes mfontanini#273 , ClickHouse/ClickHouse#21118 , etc.
@mfontanini
Copy link
Owner

This is great. We recently upgraded our kafka cluster and this started happening. Perfectly timed fix, thank you so much!

@mfontanini mfontanini merged commit dd3966f into mfontanini:master Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question about consumer group member failover

2 participants