image: juplo/kafka
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
- KAFKA_LISTENERS: BROKER://:9092, LOCALHOST://:9081
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
- KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-1:9092, LOCALHOST://localhost:9081
+ KAFKA_LISTENERS: BROKER://:9091, DOCKER://:9092, LOCALHOST://:9081
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, DOCKER:PLAINTEXT, LOCALHOST:PLAINTEXT
+ KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-1:9091, DOCKER://kafka-1:9092, LOCALHOST://localhost:9081
KAFKA_BROKER_ID: 1
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
image: juplo/kafka
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
- KAFKA_LISTENERS: BROKER://:9092, LOCALHOST://:9082
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
- KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-2:9092, LOCALHOST://localhost:9082
+ KAFKA_LISTENERS: BROKER://:9091, DOCKER://:9092, LOCALHOST://:9082
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, DOCKER:PLAINTEXT, LOCALHOST:PLAINTEXT
+ KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-2:9091, DOCKER://kafka-2:9092, LOCALHOST://localhost:9082
KAFKA_BROKER_ID: 2
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
image: juplo/kafka
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
- KAFKA_LISTENERS: BROKER://:9092, LOCALHOST://:9083
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
- KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-3:9092, LOCALHOST://localhost:9083
+ KAFKA_LISTENERS: BROKER://:9091, DOCKER://:9092, LOCALHOST://:9083
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, DOCKER:PLAINTEXT, LOCALHOST:PLAINTEXT
+ KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-3:9091, DOCKER://kafka-3:9092, LOCALHOST://localhost:9083
KAFKA_BROKER_ID: 3
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
image: juplo/kafka
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
- KAFKA_LISTENERS: BROKER://:9092, LOCALHOST://:9084
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
- KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-4:9092, LOCALHOST://localhost:9084
+ KAFKA_LISTENERS: BROKER://:9091, DOCKER://:9092, LOCALHOST://:9084
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, DOCKER:PLAINTEXT, LOCALHOST:PLAINTEXT
+ KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-4:9091, DOCKER://kafka-4:9092, LOCALHOST://localhost:9084
KAFKA_BROKER_ID: 4
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
cruise-control:
image: juplo/cruise-control
environment:
- BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
+ BOOTSTRAP_SERVERS: kafka-1:9091,kafka-2:9091,kafka-3:9091
ZOOKEEPER_CONNECT: zookeeper:2181/
ports:
- "9090:9090"
schema-registry:
image: confluentinc/cp-schema-registry:7.5.1
environment:
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
+ SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka-1:9091,kafka-2:9091,kafka-3:9091
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8085
SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL: INFO
connect:
image: confluentinc/cp-kafka-connect:7.5.1
environment:
- CONNECT_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
+ CONNECT_BOOTSTRAP_SERVERS: kafka-1:9091,kafka-2:9091,kafka-3:9091
CONNECT_REST_PORT: 8083
CONNECT_REST_LISTENERS: http://0.0.0.0:8083
CONNECT_REST_ADVERTISED_HOST_NAME: connect
- bash
- -c
- |
- cub kafka-ready -b kafka-1:9092,kafka-2:9092,kafka-3:9092 3 60 > /dev/null 2>&1 || exit 1
+ cub kafka-ready -b kafka-1:9091,kafka-2:9091,kafka-3:9091 3 60 > /dev/null 2>&1 || exit 1
if [ -e INITIALIZED ]
then
echo -n Bereits konfiguriert:
cat INITIALIZED
- kafka-topics --bootstrap-server kafka:9092 --describe --topic test
- kafka-topics --bootstrap-server kafka:9092 --describe --topic __CruiseControlMetrics
+ kafka-topics --bootstrap-server kafka:9091 --describe --topic test
+ kafka-topics --bootstrap-server kafka:9091 --describe --topic __CruiseControlMetrics
else
- kafka-topics --bootstrap-server kafka:9092 \
+ kafka-topics --bootstrap-server kafka:9091 \
--delete \
--if-exists \
--topic test
- kafka-topics --bootstrap-server kafka:9092 \
+ kafka-topics --bootstrap-server kafka:9091 \
--create \
--topic test \
--partitions 2 \
--replication-factor 3 \
--config min.insync.replicas=2 \
&& echo Das Topic \'test\' wurde erfolgreich angelegt: \
- && kafka-topics --bootstrap-server kafka:9092 --describe --topic test
- kafka-topics --bootstrap-server kafka:9092 \
+ && kafka-topics --bootstrap-server kafka:9091 --describe --topic test
+ kafka-topics --bootstrap-server kafka:9091 \
--delete \
--if-exists \
--topic __CruiseControlMetrics
- kafka-topics --bootstrap-server kafka:9092 \
+ kafka-topics --bootstrap-server kafka:9091 \
--create \
--topic __CruiseControlMetrics \
--partitions 2 \
--replication-factor 3 \
--config min.insync.replicas=2 \
&& echo Das Topic \'__CruiseControlMetrics\' wurde erfolgreich angelegt: \
- && kafka-topics --bootstrap-server kafka:9092 --describe --topic __CruiseControlMetrics
+ && kafka-topics --bootstrap-server kafka:9091 --describe --topic __CruiseControlMetrics
fi \
&& date > INITIALIZED
stop_grace_period: 0s
connections:
docker-kafka-server:
properties:
- bootstrap.servers: "kafka:9092"
+ bootstrap.servers: "kafka:9091"
schema-registry:
url: "http://schema-registry:8085"
connect: