From: Kai Moritz Date: Thu, 21 Oct 2021 20:12:14 +0000 (+0200) Subject: The splitting of the recorded sentences is done by a separate service X-Git-Tag: 2023-06-signal~4 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=37fb7bb944bd5ef97493314091f043b4c801e6bc;p=demos%2Fkafka%2Fwordcount The splitting of the recorded sentences is done by a separate service --- diff --git a/.gitmodules b/.gitmodules index ae65594..b8abc8d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -26,3 +26,6 @@ path = fortune url = ./ branch = fortune +[submodule "splitter"] + path = splitter + url = ./ diff --git a/README.sh b/README.sh index 4b5f557..db1dde9 100755 --- a/README.sh +++ b/README.sh @@ -3,7 +3,8 @@ FORTUNE=juplo/wordcount--fortune:1.0.0 RECORDER=juplo/wordcount--recorder:1.0.1 USERS=juplo/wordcount--users:1.0.4 -COUNTER=juplo/wordcount--counter:1.0.1 +SPLITTER=juplo/wordcount--splitter:1.0.0 +COUNTER=juplo/wordcount--counter:1.1.0 TOP10=juplo/wordcount--top10:1.0.1 QUERY=juplo/wordcount--query:1.0.4 @@ -13,6 +14,7 @@ then docker image rm $FORTUNE docker image rm $RECORDER docker image rm $USERS + docker image rm $SPLITTER docker image rm $COUNTER docker image rm $TOP10 docker image rm $QUERY @@ -23,6 +25,7 @@ if [[ $(docker image ls -q $FORTUNE) == "" || $(docker image ls -q $RECORDER) == "" || $(docker image ls -q $USERS) == "" || + $(docker image ls -q $SPLITTER) == "" || $(docker image ls -q $COUNTER) == "" || $(docker image ls -q $TOP10) == "" || $(docker image ls -q $QUERY) == "" || @@ -30,10 +33,11 @@ if [[ ]] then mvn clean package || exit - docker-compose rm -svf recorder users counter top10 query + docker-compose rm -svf recorder users splitter counter top10 query ( cd fortune; ./README.sh $FORTUNE; ) mvn -f recorder/pom.xml docker:build mvn -f users/pom.xml docker:build + mvn -f splitter/pom.xml docker:build mvn -f counter/pom.xml docker:build mvn -f top10/pom.xml docker:build mvn -f query/pom.xml docker:build @@ -42,6 +46,7 @@ else docker image ls $FORTUNE docker image ls $RECORDER docker image ls $USERS + docker image ls $SPLITTER docker image ls $COUNTER docker image ls $TOP10 docker image ls $QUERY diff --git a/counter b/counter index b1623c2..fe04994 160000 --- a/counter +++ b/counter @@ -1 +1 @@ -Subproject commit b1623c2b645c614424ceec3bc71008c900d82115 +Subproject commit fe049944648d9675ffe66b586b6bf860fbac696f diff --git a/docker-compose.yml b/docker-compose.yml index 87338db..a0a05c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,8 +61,19 @@ services: depends_on: - kafka + splitter: + image: juplo/wordcount--splitter:1.0.0 + labels: + - "traefik.enable=true" + - "traefik.http.routers.splitter.rule=Host(`splitter.localhost`)" + - "traefik.http.routers.splitter.entrypoints=web" + environment: + juplo.wordcount.splitter.bootstrap-server: kafka:9092 + depends_on: + - kafka + counter: - image: juplo/wordcount--counter:1.0.1 + image: juplo/wordcount--counter:1.1.0 labels: - "traefik.enable=true" - "traefik.http.routers.counter.rule=Host(`counter.localhost`)" @@ -134,10 +145,11 @@ services: image: juplo/toolbox command: bash -c " cub kafka-ready -b kafka:9092 1 60 ; - kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --topic recordings ; - kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --topic users ; - kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --topic countings ; - kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --topic top10 ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic recordings ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic users ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic words ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic countings ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic top10 ; sleep infinity" akhq: diff --git a/pom.xml b/pom.xml index 606ca8b..e116624 100644 --- a/pom.xml +++ b/pom.xml @@ -5,13 +5,14 @@ de.juplo.kafka.wordcount docker pom - 1.0.1 + 1.0.2 Docker-Compose Setup Docker-Compose Setup for the multiuser-wordcount example recorder users + splitter counter top10 query diff --git a/splitter b/splitter new file mode 160000 index 0000000..3bc3ef7 --- /dev/null +++ b/splitter @@ -0,0 +1 @@ +Subproject commit 3bc3ef7ceb76e7643e1e373293cfdc78f870838a