返回到文章

采纳

编辑于

直接用kafka-console-producer.sh发布消息,一直都报错LEADER NOT AVAULABLE

kafka

已启用auto.create.topics.enable=true

  1. 没有提前创建topic,直接用kafka-console-producer.sh发布消息,一直都报错LEADER NOT AVAULABLE
  2. /kafka-console-producer.sh --broker-list 192.168.26.136:9092,192.168.26.138:9092,192.168.26.139:9092 --topic 444

    zzzzzzzzz
    [2018-12-29 00:31:47,053] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 3 : {444=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
    [2018-12-29 00:31:47,205] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 7 : {444=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)

3、提前创建好topic再用kafka-console-producer.sh发布消息就没有报错了,版本kafka_2.11-1.1.0,ZK版本3.4.11