docker Profile Start kafka

docker container create --name kafka -p 9092:9092 -e KAFKA_BROKER_ID=0 -e KAFKA_ZOOKEEPER_CONNECT=192.168.93.88:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.93.88:9092 -e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 -t wurstmeister/kafka:2.11-2.0.1

note:

1.ip is where ip zk, zk to check whether the port is open, whether at the start would have been a failure

2.kafka using the 2.11 version because version 2.1.4 springboot use, there have been other versions of kafka spring connection failure phenomenon

3. Reference blog connection https://blog.csdn.net/qq_30166123/article/details/89705385

 

Guess you like

Origin www.cnblogs.com/ouyq/p/11344121.html