From 1beeafbf9fb3b3988bcfa20ff865cae837ab307c Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 12 Nov 2024 19:36:44 +0100 Subject: [PATCH] =?utf8?q?Vorlage=20f=C3=BCr=20die=20`@KafkaListener`-?= =?utf8?q?=C3=9Cbung?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- README.sh | 42 ------------------- .../java/de/juplo/kafka/ExampleConsumer.java | 2 - 2 files changed, 44 deletions(-) delete mode 100755 README.sh diff --git a/README.sh b/README.sh deleted file mode 100755 index 9ff3473..0000000 --- a/README.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -IMAGE=juplo/supersimple-consumer:1.0-SNAPSHOT - -if [ "$1" = "cleanup" ] -then - docker compose -f docker/docker-compose.yml down -t0 -v --remove-orphans - mvn clean - exit -fi - -docker compose -f docker/docker-compose.yml up -d --remove-orphans kafka-1 kafka-2 kafka-3 -docker compose -f docker/docker-compose.yml rm -svf producer - -if [[ - $(docker image ls -q $IMAGE) == "" || - "$1" = "build" -]] -then - mvn clean install || exit -else - echo "Using image existing images:" - docker image ls $IMAGE -fi - -docker compose -f docker/docker-compose.yml up --remove-orphans setup || exit 1 - - -docker compose -f docker/docker-compose.yml up -d producer -docker compose -f docker/docker-compose.yml up -d consumer-1 consumer-2 -sleep 15 - -docker compose -f docker/docker-compose.yml stop producer - -echo -echo "Von consumer-1 empfangen:" -docker compose -f docker/docker-compose.yml logs consumer-1 | grep '\ test\/.' -echo -echo "Von consumer-2 empfangen:" -docker compose -f docker/docker-compose.yml logs consumer-2 | grep '\ test\/.' - -docker compose -f docker/docker-compose.yml stop consumer-1 consumer-2 diff --git a/src/main/java/de/juplo/kafka/ExampleConsumer.java b/src/main/java/de/juplo/kafka/ExampleConsumer.java index d04aa61..c4b0b60 100644 --- a/src/main/java/de/juplo/kafka/ExampleConsumer.java +++ b/src/main/java/de/juplo/kafka/ExampleConsumer.java @@ -5,7 +5,6 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.kafka.annotation.KafkaListener; -// tag::supersimple[] @SpringBootApplication @Slf4j public class ExampleConsumer @@ -21,4 +20,3 @@ public class ExampleConsumer SpringApplication.run(ExampleConsumer.class, args); } } -// end::supersimple[] -- 2.20.1