Exception running kafka-console-producer.sh (0.8.1.1)

前端 未结 2 2195
忘掉有多难
忘掉有多难 2021-02-19 06:29

I am trying out the kafka-console-producer.sh. I type something to the console and hit enter and I get tons of stack traces to the console like this. Appreciate any pointers.

2条回答
  •  醉酒成梦
    2021-02-19 07:18

    Your broker-list argument is pointing to Zookeeper instead of the actual broker. The proper usage would be:

    ./bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
    

    assuming your broker runs on port 9092 (default).

    You can refer here for more information (your issue is described in Step 4: Send some messages)

提交回复
热议问题