X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=docker-compose.yml;h=b50ebc14728cb8b36e94accf39f032710e75e396;hb=a30fdb455b638e63e0e2084ad916cadb1d44f108;hp=f3614d5328f8273e24cb22f1d962fa45dbec089e;hpb=802ebbfc497a94e4a55222de31d22fd076f0d4a1;p=demos%2Fkafka%2Ftraining diff --git a/docker-compose.yml b/docker-compose.yml index f3614d5..b50ebc1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -60,6 +60,10 @@ services: depends_on: - zookeeper + cli: + image: confluentinc/confluent-cli:7.1.3 + command: sleep infinity + setup: image: juplo/toolbox command: > @@ -70,36 +74,16 @@ services: 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 - kafka-topics --bootstrap-server kafka:9092 --describe --topic test | kafkacat -P -b kafka:9092 -t test -X acks=all - kafkacat -C -b kafka:9092 -t test -o 0 -e " - - cli: - image: juplo/toolbox - command: sleep infinity - - acks-all: - image: juplo/rest-producer:1.0-SNAPSHOT - ports: - - 8082:8080 - environment: - server.port: 8080 - producer.bootstrap-server: kafka:9092 - producer.client-id: acks-all - producer.topic: test - producer.acks: all - - acks-1: - image: juplo/rest-producer:1.0-SNAPSHOT - ports: - - 8081:8080 - environment: - server.port: 8080 - producer.bootstrap-server: kafka:9092 - producer.client-id: acks-1 - producer.topic: test - producer.acks: 1 + producer: + 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'