From the course: Complete Guide to Apache Kafka for Beginners

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Java consumer incremental cooperative rebalance and static group membership

Java consumer incremental cooperative rebalance and static group membership - Kafka Tutorial

From the course: Complete Guide to Apache Kafka for Beginners

Java consumer incremental cooperative rebalance and static group membership

Okay. So let's talk about consumer groups and partition rebalance strategies. So whenever you have consumers joining and leaving a group, partitions are going to move. And when partitions move between consumers, it's called a rebalance. Okay. These rebalance happens whenever a consumer leaves or joins a group. And it also happens for example, if an administrator adds a new partition into a topic. So let's take an example. We have three partitions and two consumers into a group. And then what happens is that's something we've seen right away, right before is that a new consumer joins this group. And so the whole question is how do these partitions get assigned to the consumers and what happens? And based on, well, the strategies, the outcomes can be different and you may be surprised. So the first one, and it's called a eager rebalance and it's one of the default behavior. And so the eager rebalance has it like this. So consumer three joins the group and then all consumers are going to…

Contents