From the course: Troubleshooting and Debugging Kafka

Unlock this course with a free trial

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

Monitoring consumer group rebalancing

Monitoring consumer group rebalancing - Kafka Tutorial

From the course: Troubleshooting and Debugging Kafka

Monitoring consumer group rebalancing

Now, let's go back and set up our consumer group as it's meant to be with multiple consumers. I'm now going to run three consumers within our group, but before that, I'm going to kill the producer that's on the left terminal window, and I'm going to kill the one consumer that we have, Consumer A. Let's take a look at the code. Here, we have the code for Consumer A on Line 5. We've specified that it belongs to the payment group. Now, Consumer B has the exact same code. And notice on Line 5 that it belongs to the same consumer group, payment group. The rest of the code here for the consumer is identical to consumer A, so I don't really need to go over this code again. And let's take a look at Consumer C, the code is exactly the same. This is the third consumer that belongs to the payment group. You can see this on Line 5. I'll now switch to a screen where I have four terminal windows open. Now to the top left, I'm going to run the producer. The remaining terminal windows are for the…

Contents