Search code examples
apache-kafkakcat

Find the lead of kafka cluster using kafkacat


I have kafka cluster in docker containers created using this tutorial. When I run kafkacat -L -b kafka-1:19092 i get:

Metadata for all topics (from broker 1: kafka-1:19092/1):
 3 brokers:
  broker 2 at kafka-2:29092
  broker 3 at kafka-3:39092
  broker 1 at kafka-1:19092
 1 topics:
  topic "__confluent.support.metrics" with 1 partitions:
    partition 0, leader 2, replicas: 2,3, isrs: 2,3

How can I find the lead broker? I would like to kill it and see behavior of cluster after electing new lead.


Solution

  • Clusters have a single controller.

    Topics have leaders

    topic "__confluent.support.metrics" with 1 partitions:
        partition 0, leader 2, replicas: 2,3, isrs: 2,3