通过 Docker Compose 搭建 Kafka 单机版docker-compose-single-kafka.yml12345678910111213141516171819202122232425262728293031version: '2'services: zookeeper: image: wurstmeister/zookeeper container_name: "zk-kafka" ports: - "2181:2181" kafka: image: wurstmeister/kafka container_name: "kafka-single" ports: - "9092:9092" environment: # client 要访问的 broker 地址 KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1 # 通过端口连接 zookeepe ...