kafka设置ip
相关内容:
1、配置advertised.listeners
cd /kafka/kafka_2.12-2.5.0/config
vim server.properties
advertised.listeners=PLAINTEXT://192.168.43.100:9092
2、生产消费
producer生产数据 bin/kafka-console-producer.sh --broker-list 192.168.43.100:9092 --topic test
>
consumer来接收数据
bin/kafka-console-consumer.sh --bootstrap-server 192.168.43.100:9092 --topic test --from-beginning