ERROR Error when sending message to topic

前端 未结 13 2138
借酒劲吻你
借酒劲吻你 2020-12-28 13:46

While producing message in kafka, i am getting the following error :

$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic nil_PF1_P1
hi
hello         


        
13条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-28 13:57

    I faced similar problem, where I was able to produce and consume on localhost but not from different machines on network. Based few answers I got the clue that essentially we need to expose advertised.listener to producer and consumer, however giving 0.0.0.0 was also not working. So gave exact IP against advertised.listeners

    advertised.listeners=PLAINTEXT://HOST.IP:9092

    And I left listener=PLAINTEXT://:9092 as it is.

    So with this the spark exposes advertised ip and port to producers and consumers

提交回复
热议问题