X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=docker-compose.yml;h=61a0a85e72d5aafd30f8ef4bf1e7da46364f352c;hb=19ac32f8c71f454f0248f24e64905669a55cdf01;hp=7ae8d9b1c666adac2867d326154ab917e350a47f;hpb=bd90c4a5a2ddb52dbcddb655b25ffc2a6db5f391;p=demos%2Fkafka%2Ftraining diff --git a/docker-compose.yml b/docker-compose.yml index 7ae8d9b..61a0a85 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -60,29 +60,30 @@ services: depends_on: - zookeeper + cli: + image: confluentinc/cp-kafka:7.1.3 + command: sleep infinity + setup: image: juplo/toolbox command: > bash -c " + kafka-topics --bootstrap-server kafka:9092 --describe --topic test kafka-topics --bootstrap-server kafka:9092 --delete --if-exists --topic test 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 + kafka-topics --bootstrap-server kafka-1:9092 --describe --topic test + kafka-topics --bootstrap-server kafka-2:9092 --describe --topic test + kafka-topics --bootstrap-server kafka-3:9092 --describe --topic test " - - cli: - image: juplo/toolbox - command: sleep infinity - producer: - image: juplo/rest-producer:1.0-SNAPSHOT - ports: - - 8080:8080 - environment: - server.port: 8080 - producer.bootstrap-server: kafka:9092 - producer.client-id: producer - producer.topic: test + image: confluentinc/cp-kafkacat:7.1.3 + command: > + bash -c " + echo 'hello world' | kafkacat -P -b kafka:9092 -t test -X acks=all + echo 'hello world' | kafkacat -P -b kafka:9092 -t test -X acks=all + echo 'hello world' | kafkacat -P -b kafka:9092 -t test -X acks=all + " consumer: - image: juplo/toolbox - command: kafkacat -C -b kafka:9092 -t test -o 0 -f'p=%p|o=%o|k=%k|v=%s\n' + image: confluentinc/cp-kafkacat:7.1.3 + command: kafkacat -C -b kafka:9092 -t test -o 0 -e -f'p=%p|o=%o|k=%k|v=%s\n'