Not able consume messages from remote machine in Kafka

后端 未结 1 1998
[愿得一人]
[愿得一人] 2021-01-21 22:47

I have created a kafka topic in one of my machine having IP 192.168.25.50 of topic name test-poc. Then by using kafka-console-producer i have produced message as like below

相关标签:
1条回答
  • 2021-01-21 23:48

    By default the broker will bind to localhost. If your machine ip is a.b.c.d and it's a vm instance, then you need to uncomment the Line in server.properties containing listeners=PLAINTEXT://:9092 and put listeners=PLAINTEXT://a.b.c.d:9092

    If it's a docker container you can try adding the following two lines:

    listeners=PLAINTEXT://0.0.0.0:9092
    advertised.listeners=PLAINTEXT://a.b.c.d:9092
    
    0 讨论(0)
提交回复
热议问题