docker run -d --name zookeeper -p 2181:2181 -t zookeeper:latest
docker run -d --name kafka -p 9092:9092 -e KAFKA_BROKER_ID=0 -e KAFKA_ZOOKEEPER_CONNECT=192.168.0.125:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://:9092 -e KAFKA_LISTENERS=PLAINTEXT://:9092 wurstmeister/kafka
进入容器
docker exec -it kafka /bin/bash
创建主题
./kafka-topics.sh --create --zookeeper 192.168.0.125:2181 --replication-factor 1 --partitions 1 --topic test
消息太长报错修改
message.max.bytes=1024000000
标签:--,9092,kafka,2181,docker,KAFKA,安装 From: https://www.cnblogs.com/moon3496694/p/17214017.html