How does consumer rebalancing work in Kafka?

后端 未结 2 388
青春惊慌失措
青春惊慌失措 2020-12-12 21:00

When a new consumer/brorker is added or goes down, Kafka triggers a rebalance operation. Is Kafka Rebalancing a blocking operation. Are Kafka consumers blocked while a rebal

2条回答
  •  隐瞒了意图╮
    2020-12-12 21:29

    The accepted response above (from serejja) was correct in the past. Kafka has implemented "Incremental Cooperative Rebalancing" from version 2.3 (release date June 2019) and above. So now there is no need for all consumers to stop the processing ("stop the world event") to rebalance work in group fe. when new consumer appears in group or some consumer goes offline.

    For more info see: From Eager to Smarter in Apache Kafka Consumer Rebalances

提交回复
热议问题