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

    1. version: '2'
    2. services:
    3. zookeeper:
    4. container_name: zookeeper
    5. image: wurstmeister/zookeeper
    6. volumes:
    7. - ./zookeeper/data:/data
    8. ports:
    9. - "2181:2181"
    10. kafka:
    11. container_name: kafka
    12. image: wurstmeister/kafka
    13. ports:
    14. - "9092:9092"
    15. environment:
    16. KAFKA_ADVERTISED_HOST_NAME: localhost
    17. KAFKA_MESSAGE_MAX_BYTES: 2000000
    18. KAFKA_CREATE_TOPICS: "test:1:1"
    19. KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
    20. volumes:
    21. - ./kafka:/kafka
    22. - /var/run/docker.sock:/var/run/docker.sock
    23. kafka-manager:
    24. container_name: kafka-manager
    25. image: sheepkiller/kafka-manager
    26. ports:
    27. - 9020:9000
    28. environment:
    29. ZK_HOSTS: zookeeper:2181