|
@@ -7,6 +7,8 @@ services:
|
|
|
environment:
|
|
|
ZOOKEEPER_CLIENT_PORT: 2181
|
|
|
ZOOKEEPER_TICK_TIME: 2000
|
|
|
+ ports:
|
|
|
+ - 2181:2181
|
|
|
|
|
|
kafka0:
|
|
|
image: confluentinc/cp-kafka:5.1.0
|
|
@@ -18,15 +20,37 @@ services:
|
|
|
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka0:29092,PLAINTEXT_HOST://localhost:9092
|
|
|
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
|
|
|
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
|
|
|
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
|
|
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
|
|
|
JMX_PORT: 9997
|
|
|
- KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9997
|
|
|
+ KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.rmi.port=9997
|
|
|
+ ports:
|
|
|
+ - 9092:9092
|
|
|
+ - 9997:9997
|
|
|
+
|
|
|
+ kafka01:
|
|
|
+ image: confluentinc/cp-kafka:5.1.0
|
|
|
+ depends_on:
|
|
|
+ - zookeeper0
|
|
|
+ environment:
|
|
|
+ KAFKA_BROKER_ID: 2
|
|
|
+ KAFKA_ZOOKEEPER_CONNECT: zookeeper0:2181
|
|
|
+ KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka01:29092,PLAINTEXT_HOST://localhost:9094
|
|
|
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,PLAIN:PLAINTEXT
|
|
|
+ KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
|
|
|
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
|
|
|
+ JMX_PORT: 9999
|
|
|
+ KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.rmi.port=9999
|
|
|
+ ports:
|
|
|
+ - 9094:9094
|
|
|
+ - 9999:9999
|
|
|
|
|
|
zookeeper1:
|
|
|
image: confluentinc/cp-zookeeper:5.1.0
|
|
|
environment:
|
|
|
ZOOKEEPER_CLIENT_PORT: 2181
|
|
|
ZOOKEEPER_TICK_TIME: 2000
|
|
|
+ ports:
|
|
|
+ - 2182:2181
|
|
|
|
|
|
kafka1:
|
|
|
image: confluentinc/cp-kafka:5.1.0
|
|
@@ -39,16 +63,20 @@ services:
|
|
|
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
|
|
|
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
|
|
|
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
|
|
- JMX_PORT: 9997
|
|
|
- KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka1 -Dcom.sun.management.jmxremote.rmi.port=9997
|
|
|
+ JMX_PORT: 9998
|
|
|
+ KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.rmi.port=9998
|
|
|
+ ports:
|
|
|
+ - 9093:9093
|
|
|
+ - 9998:9998
|
|
|
|
|
|
schemaregistry0:
|
|
|
image: confluentinc/cp-schema-registry:5.1.0
|
|
|
depends_on:
|
|
|
- zookeeper0
|
|
|
- kafka0
|
|
|
+ - kafka01
|
|
|
environment:
|
|
|
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka0:29092
|
|
|
+ SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka0:29092,PLAINTEXT://kafka01:29092
|
|
|
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: zookeeper0:2181
|
|
|
SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL: PLAINTEXT
|
|
|
SCHEMA_REGISTRY_HOST_NAME: schemaregistry0
|