windows安装
启动
.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
.\bin\windows\kafka-server-start.bat .\config\server.properties
创建topic
.\bin\windows\kafka-topics.bat —create —topic ndr —bootstrap-server localhost:9092
.\bin\windows\kafka-topics.bat —create —topic aisa —bootstrap-server localhost:9092
version: '2'
services:
zookeeper:
container_name: zookeeper
image: wurstmeister/zookeeper
volumes:
- ./zookeeper/data:/data
ports:
- "2181:2181"
kafka:
container_name: kafka
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_MESSAGE_MAX_BYTES: 2000000
KAFKA_CREATE_TOPICS: "test:1:1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- ./kafka:/kafka
- /var/run/docker.sock:/var/run/docker.sock
kafka-manager:
container_name: kafka-manager
image: sheepkiller/kafka-manager
ports:
- 9020:9000
environment:
ZK_HOSTS: zookeeper:2181