Error creating Kafka Topics- Replication factor larger than available brokers

前端 未结 15 2022
时光取名叫无心
时光取名叫无心 2020-12-30 18:30

I am trying to create topics in Kafka by following the guide on Apache Kafka website through command line. While running the command:

bin/kafka-topics.sh --c         


        
15条回答
  •  误落风尘
    2020-12-30 19:05

    For those who are sure that the brokers are up and running, check your server.properties configuration.

    In my case the znodes for kafka is /kafka as shown below.

    zookeeper.connect=zk1.beta:2181,zk2.beta:2181,zk3.beta:2181/kafka
    

    So, try the following command while creating topic:

    bin/kafka-topics.sh --create --zookeeper zk1.beta:2181/kafka --replication-factor 2 --partitions 2 --topic test2
    

提交回复
热议问题