0
votes

I'm writing a Go service that works with Kafka. I have a problems with bad commits when broker rebalances. I want to do an experiment forcing Kafka to rebalance and to see how the service behaves.

What I do:

  • running Kafka in Docker locally (broker, zookeeper, schema registry and control center)
  • created a topic with 2 partition
  • running producer that sends messages to both partitions

Then I'm running two consumers with the same groupID, after that I'm closing one. It seems to me that broker should start rebalancing this moment. Or no? Who's logs should I check for it?

2
What do you mean, exactly? What is a "bad commit"? Again, Brokers don't "rebalance". Consumer groups do... - OneCricketeer

2 Answers

1
votes

You can check that by running the following commands:

bin/kafka-consumer-groups --bootstrap-server host:9092 --list

and to describe:

bin/kafka-consumer-groups --bootstrap-server host:9092 --describe --group foo

Full documentation could be found here: Kafka consumer group

0
votes

Who's logs should I check for it?

The running consumer's log should be checked, depending on if the library you're using actually logs such information.