Last active
January 22, 2020 07:30
-
-
Save seglo/8e333128a2938820c8eb3e08a2517167 to your computer and use it in GitHub Desktop.
user-events kafka cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See dockerhub for different versions of kafka and zookeeper: | |
# https://hub.docker.com/r/wurstmeister/kafka/ | |
# https://hub.docker.com/r/wurstmeister/zookeeper/ | |
# Usage notes: | |
# https://github.com/wurstmeister/kafka-docker/ | |
version: '2' | |
services: | |
zookeeper: | |
image: wurstmeister/zookeeper:3.4.6 | |
ports: | |
- "2181:2181" | |
kafka: | |
image: wurstmeister/kafka:2.12-2.4.0 | |
ports: | |
- "9094:9094" | |
environment: | |
HOSTNAME_COMMAND: "docker info | grep ^Name: | cut -d' ' -f 2" | |
PORT_COMMAND: "docker port `hostname` 9094 | cut -d: -f 2" | |
KAFKA_ADVERTISED_LISTENERS: INSIDE://:9092,OUTSIDE://_{HOSTNAME_COMMAND}:_{PORT_COMMAND} | |
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9094 | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT | |
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE | |
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | |
KAFKA_CREATE_TOPICS: "user-events:128:1" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notes
user-events
topic with 128 partitions9094