已启用auto.create.topics.enable=true
- 没有提前创建topic,直接用kafka-console-producer.sh发布消息,一直都报错LEADER NOT AVAULABLE
- /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
警告,忽视
你的答案