KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false"
ports:
- 9081:9081
+ healthcheck:
+ test: [ "CMD", "kafka-topics.sh", "--bootstrap-server", ":9092", "--list" ]
kafka-2:
image: bitnami/kafka:3.3.1
default:
aliases:
- kafka
+ healthcheck:
+ test: [ "CMD", "kafka-topics.sh", "--bootstrap-server", ":9092", "--list" ]
kafka-3:
image: bitnami/kafka:3.3.1
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false"
ports:
- 9083:9083
+ healthcheck:
+ test: [ "CMD", "kafka-topics.sh", "--bootstrap-server", ":9092", "--list" ]
setup:
image: juplo/toolbox
kafka-topics --bootstrap-server kafka:9092 --create --topic test --partitions 2 --replication-factor 3 --config min.insync.replicas=2
kafka-topics --bootstrap-server kafka:9092 --describe --topic test
"
+ depends_on:
+ kafka-1:
+ condition: service_healthy
+ kafka-2:
+ condition: service_healthy
+ kafka-3:
+ condition: service_healthy
cli:
image: juplo/toolbox
producer:
image: juplo/simple-producer:1.0-SNAPSHOT
command: producer
+ depends_on:
+ kafka-1:
+ condition: service_healthy
+ kafka-2:
+ condition: service_healthy
+ kafka-3:
+ condition: service_healthy
consumer-1:
image: juplo/simple-consumer:1.0-SNAPSHOT
command: kafka:9092 test my-group consumer-1
+ depends_on:
+ kafka-1:
+ condition: service_healthy
+ kafka-2:
+ condition: service_healthy
+ kafka-3:
+ condition: service_healthy
consumer-2:
image: juplo/simple-consumer:1.0-SNAPSHOT
command: kafka:9092 test my-group consumer-2
+ depends_on:
+ kafka-1:
+ condition: service_healthy
+ kafka-2:
+ condition: service_healthy
+ kafka-3:
+ condition: service_healthy
consumer-3:
image: juplo/simple-consumer:1.0-SNAPSHOT
command: kafka:9092 test my-group consumer-3
+ depends_on:
+ kafka-1:
+ condition: service_healthy
+ kafka-2:
+ condition: service_healthy
+ kafka-3:
+ condition: service_healthy
spikzettel:
image: juplo/toolbox
--topic __consumer_offsets --from-beginning \
--formatter "kafka.coordinator.group.GroupMetadataManager\$$OffsetsMessageFormatter"
'
+ depends_on:
+ kafka-1:
+ condition: service_healthy
+ kafka-2:
+ condition: service_healthy
+ kafka-3:
+ condition: service_healthy