mfontanini / cppkafka

Modern C++ Apache Kafka client library (wrapper for librdkafka)
BSD 2-Clause "Simplified" License
587 stars 207 forks source link

Fix for failover issue. #281

Closed filimonov closed 3 years ago

filimonov commented 3 years ago

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 https://github.com/mfontanini/cppkafka/issues/273 , https://github.com/ClickHouse/ClickHouse/issues/21118 , etc.

mfontanini commented 3 years ago

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