4 image: confluentinc/cp-zookeeper:7.5.1
6 ZOOKEEPER_CLIENT_PORT: 2181
10 - zookeeper-data:/var/lib/zookeeper/data
11 - zookeeper-log:/var/lib/zookeeper/log
14 image: confluentinc/cp-kafka:7.5.1
16 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
17 KAFKA_LISTENERS: BROKER://:9092, LOCALHOST://:9081
18 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
19 KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-1:9092, LOCALHOST://localhost:9081
21 KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
22 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
23 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
25 -javaagent:/usr/share/java/cp-base-new/jmx_prometheus_javaagent-0.18.0.jar=0.0.0.0:80:/etc/jmx-exporter.yml
26 -Dcom.sun.management.jmxremote=true
27 -Dcom.sun.management.jmxremote.port=9101
28 -Dcom.sun.management.jmxremote.authenticate=false
30 - ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
31 - kafka-1-data:/var/lib/kafka/data
34 stop_grace_period: 120s
39 image: confluentinc/cp-kafka:7.5.1
41 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
42 KAFKA_LISTENERS: BROKER://:9092, LOCALHOST://:9082
43 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
44 KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-2:9092, LOCALHOST://localhost:9082
46 KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
47 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
48 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
50 -javaagent:/usr/share/java/cp-base-new/jmx_prometheus_javaagent-0.18.0.jar=0.0.0.0:80:/etc/jmx-exporter.yml
51 -Dcom.sun.management.jmxremote=true
52 -Dcom.sun.management.jmxremote.port=9101
53 -Dcom.sun.management.jmxremote.authenticate=false
55 - ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
56 - kafka-2-data:/var/lib/kafka/data
64 stop_grace_period: 120s
69 image: confluentinc/cp-kafka:7.5.1
71 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
72 KAFKA_LISTENERS: BROKER://:9092, LOCALHOST://:9083
73 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
74 KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-3:9092, LOCALHOST://localhost:9083
76 KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
77 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
78 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
80 -javaagent:/usr/share/java/cp-base-new/jmx_prometheus_javaagent-0.18.0.jar=0.0.0.0:80:/etc/jmx-exporter.yml
81 -Dcom.sun.management.jmxremote=true
82 -Dcom.sun.management.jmxremote.port=9101
83 -Dcom.sun.management.jmxremote.authenticate=false
85 - ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
86 - kafka-3-data:/var/lib/kafka/data
89 stop_grace_period: 120s
94 image: confluentinc/cp-schema-registry:7.5.1
96 SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
97 SCHEMA_REGISTRY_HOST_NAME: schema-registry
98 SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8085
99 SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL: INFO
108 image: confluentinc/cp-kafka-connect:7.5.1
110 CONNECT_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
111 CONNECT_REST_PORT: 8083
112 CONNECT_REST_LISTENERS: http://0.0.0.0:8083
113 CONNECT_REST_ADVERTISED_HOST_NAME: connect
114 CONNECT_CONFIG_STORAGE_TOPIC: __connect-config
115 CONNECT_OFFSET_STORAGE_TOPIC: __connect-offsets
116 CONNECT_STATUS_STORAGE_TOPIC: __connect-status
117 CONNECT_GROUP_ID: kafka-connect
118 CONNECT_KEY_CONVERTER_SCHEMAS_ENABLE: "true"
119 CONNECT_KEY_CONVERTER: io.confluent.connect.avro.AvroConverter
120 CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry:8085
121 CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE: "true"
122 CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
123 CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry:8085
124 CONNECT_INTERNAL_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter
125 CONNECT_INTERNAL_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
126 CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
127 CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
128 CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
129 CONNECT_PLUGIN_PATH: /usr/share/java/
137 command: sleep infinity
138 stop_grace_period: 0s
150 cub kafka-ready -b kafka-1:9092,kafka-2:9092,kafka-3:9092 3 60 > /dev/null 2>&1 || exit 1
151 if [ -e INITIALIZED ]
153 echo -n Bereits konfiguriert:
155 kafka-topics --bootstrap-server kafka:9092 --describe --topic test
157 kafka-topics --bootstrap-server kafka:9092 \
161 kafka-topics --bootstrap-server kafka:9092 \
165 --replication-factor 3 \
166 --config min.insync.replicas=2 \
167 && echo Das Topic \'test\' wurde erfolgreich angelegt: \
168 && kafka-topics --bootstrap-server kafka:9092 --describe --topic test \
169 && date > INITIALIZED
171 stop_grace_period: 0s
176 image: tchiotludo/akhq:0.23.0
180 AKHQ_CONFIGURATION: |
185 bootstrap.servers: "kafka:9092"
187 url: "http://schema-registry:8085"
190 url: "http://connect:8083"