From b95cf65724e12ba000e9ab00254fc4f6fd3b137b Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 29 Sep 2022 22:17:12 +0200 Subject: [PATCH] =?utf8?q?Fix:=20=C3=9Cbung=20Consumer-Groups=20mit=20simp?= =?utf8?q?le-consumer?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- docker-compose.yml | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3aefb4b..73b568e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,5 +2,5 @@ FROM openjdk:11-jre VOLUME /tmp COPY target/*.jar /opt/app.jar COPY target/libs /opt/libs -ENTRYPOINT [ "java", "-jar", "/opt/app.jar", "kafka:9092", "test", "my-group" ] +ENTRYPOINT [ "java", "-jar", "/opt/app.jar" ] CMD [ "DCKR" ] diff --git a/docker-compose.yml b/docker-compose.yml index 7739b2b..9422b3a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,6 +77,24 @@ services: image: juplo/simple-producer:1.0-SNAPSHOT command: producer - consumer: + consumer-1: image: juplo/simple-consumer:1.0-SNAPSHOT - command: consumer + command: kafka:9092 test my-group consumer-1 + + consumer-2: + image: juplo/simple-consumer:1.0-SNAPSHOT + command: [ kafka:9092, test, my-group, consumer-2 ] + + consumer-3: + image: juplo/simple-consumer:1.0-SNAPSHOT + command: [ kafka:9092, test, my-group, consumer-3 ] + + spikzettel: + image: juplo/toolbox + command: > + bash -c ' + kafka-console-consumer \ + --bootstrap-server kafka:9092 \ + --topic __consumer_offsets --from-beginning \ + --formatter "kafka.coordinator.group.GroupMetadataManager\$$OffsetsMessageFormatter" + ' -- 2.20.1