The kafka-consumer-groups Command

It is time we add the final tool in our tool belt—the kafka-consumer-groups command, which can be an important aid in understanding and debugging Kafka Streams applications. We’ll be using this command to:

  • See how many members exist in a group.

  • Which partition (or partitions) each member is assigned.

  • Check the offset of each partition and consumer.

  • Check if the group is rebalancing.

Setting up the system

We learned about consumer groups using an example that contained:

  • A topic with three partitions called payments.

  • A producer writing messages to the topic.

  • A consumer group called processors, which started with one consumer and ended up with three.

  • Another consumer group called reports, with one member.

We’ll be using the terminal below to run the different services in the system.

Get hands-on with 1200+ tech skills courses.