version: '3.2'
services:
zookeeper:
- image: bitnami/zookeeper:3.9
+ image: confluentinc/cp-zookeeper:7.5.1
environment:
- - ALLOW_ANONYMOUS_LOGIN=yes
+ ZOOKEEPER_CLIENT_PORT: 2181
ports:
- 2181:2181
volumes:
- - zookeeper:/bitnami
+ - zookeeper-data:/var/lib/zookeeper/data
+ - zookeeper-log:/var/lib/zookeeper/log
kafka-1:
- image: bitnami/kafka:3.5.1
+ image: confluentinc/cp-kafka:7.5.1
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
- KAFKA_CFG_LISTENERS: BROKER://:9092, LOCALHOST://:9081
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS: BROKER://kafka-1:9092, LOCALHOST://localhost:9081
- KAFKA_CFG_BROKER_ID: 1
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME: BROKER
- KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false"
+ 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_BROKER_ID: 1
+ KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
+ KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_OPTS:
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9101
-Dcom.sun.management.jmxremote.authenticate=false
volumes:
- - kafka-1:/bitnami/kafka
+ - kafka-1-data:/var/lib/kafka/data
ports:
- 9081:9081
depends_on:
- zookeeper
kafka-2:
- image: bitnami/kafka:3.5.1
+ image: confluentinc/cp-kafka:7.5.1
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
- KAFKA_CFG_LISTENERS: BROKER://:9092, LOCALHOST://:9082
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS: BROKER://kafka-2:9092, LOCALHOST://localhost:9082
- KAFKA_CFG_BROKER_ID: 2
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME: BROKER
- KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false"
+ 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_BROKER_ID: 2
+ KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
+ KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_OPTS:
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9101
-Dcom.sun.management.jmxremote.authenticate=false
volumes:
- - kafka-2:/bitnami/kafka
+ - kafka-2-data:/var/lib/kafka/data
ports:
- 9092:9082
- 9082:9082
- zookeeper
kafka-3:
- image: bitnami/kafka:3.5.1
+ image: confluentinc/cp-kafka:7.5.1
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
- KAFKA_CFG_LISTENERS: BROKER://:9092, LOCALHOST://:9083
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS: BROKER://kafka-3:9092, LOCALHOST://localhost:9083
- KAFKA_CFG_BROKER_ID: 3
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME: BROKER
- KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false"
+ 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_BROKER_ID: 3
+ KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
+ KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_OPTS:
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9101
-Dcom.sun.management.jmxremote.authenticate=false
volumes:
- - kafka-3:/bitnami/kafka
+ - kafka-3-data:/var/lib/kafka/data
ports:
- 9083:9083
depends_on:
- zookeeper
schema-registry:
- image: confluentinc/cp-schema-registry
+ image: confluentinc/cp-schema-registry:7.5.1
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'PLAINTEXT://kafka:9092'
SCHEMA_REGISTRY_HOST_NAME: 'schema-registry'
- kafka-3
connect:
- image: confluentinc/cp-kafka-connect
+ image: confluentinc/cp-kafka-connect:7.5.1
environment:
CONNECT_BOOTSTRAP_SERVERS: 'kafka:9092'
CONNECT_REST_PORT: '8083'
- setup
volumes:
- zookeeper:
- kafka-1:
- kafka-2:
- kafka-3:
+ zookeeper-data:
+ zookeeper-log:
+ kafka-1-data:
+ kafka-2-data:
+ kafka-3-data: