Topic can't be found when producing messages: UNKNOWN_TOPIC_OR_PARTITION

前端 未结 1 1519
暗喜
暗喜 2021-02-13 20:41

I have a two-nodes Kafka cluster (EC2 instances) where each node is used as a separate broker. When I run a producer on the leader instance with the following command:



        
相关标签:
1条回答
  • 2021-02-13 21:09

    Make the replication factor 2 for topic test and you won't get this exception anymore. Since you have a 2 broker cluster, execute the command below to produce messages:

    kafka-console-producer.sh   --broker-list localhost:9092,localhost:9093 --topic test
    

    This will send messages to both of the brokers in the clusters.

    0 讨论(0)
提交回复
热议问题