From: Kai Moritz Date: Mon, 5 Sep 2022 16:37:56 +0000 (+0200) Subject: WIP X-Git-Tag: sumup-gateway--springified---lvm-2-tage~3 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=697c70a88a663da11b8cfdfb8ea4e7c5c4aac72d;hp=e09650509adafd0b28f141ea1302fa27ba69b73a;p=demos%2Fkafka%2Ftraining WIP --- diff --git a/README.sh b/README.sh index 25b8f62..3da5bbe 100755 --- a/README.sh +++ b/README.sh @@ -1,6 +1,6 @@ #!/bin/bash -IMAGE=juplo/sumup-gateway:1.0-SNAPSHOT +IMAGE=juplo/sumup-gateway--springified:1.0-SNAPSHOT if [ "$1" = "cleanup" ] then @@ -16,7 +16,7 @@ if [[ "$1" = "build" ]] then - docker-compose rm -svf gateway + docker-compose rm -svf gateway gateway-0 gateway-1 mvn clean install || exit else echo "Using image existing images:" @@ -26,15 +26,17 @@ fi echo "Waiting for the Kafka-Cluster to become ready..." docker-compose exec cli cub kafka-ready -b kafka:9092 3 60 > /dev/null 2>&1 || exit 1 docker-compose up setup -docker-compose up -d gateway +docker-compose up -d gateway gateway-0 gateway-1 while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway..."; sleep 1; done docker-compose up -d consumer -echo foo | http -v :8080/bar -echo 66 | http -v :8080/foo +echo foo | http -v :8082/peter +echo bar | http -v :8082/klaus + +echo FOO | http -v :8080/peter +echo BAR | http -v :8081/klaus -docker-compose logs gateway docker-compose stop consumer docker-compose logs consumer diff --git a/docker-compose.yml b/docker-compose.yml index 5400911..f4b271f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -74,33 +74,33 @@ services: command: sleep infinity gateway-partition-0: - image: juplo/sumup-gateway-springified:1.0-SNAPSHOT + image: juplo/sumup-gateway--springified:1.0-SNAPSHOT ports: - 8080:8080 environment: server.port: 8080 spring-kafka.bootstrap-servers: kafka:9092 - spring.kafka.client-id: gateway-partition-0 + spring.kafka.client-id: gateway-0 sumup.gateway.partition: 0 - gateway-partition-0: - image: juplo/sumup-gateway-springified:1.0-SNAPSHOT + gateway-0: + image: juplo/sumup-gateway--springified:1.0-SNAPSHOT ports: - 8081:8080 environment: server.port: 8080 spring-kafka.bootstrap-servers: kafka:9092 - spring.kafka.client-id: gateway-partition-1 + spring.kafka.client-id: gateway-1 sumup.gateway.partition: 1 - gateway-hashed: - image: juplo/sumup-gateway-springified:1.0-SNAPSHOT + gateway: + image: juplo/sumup-gateway--springified:1.0-SNAPSHOT ports: - 8082:8080 environment: server.port: 8080 spring-kafka.bootstrap-servers: kafka:9092 - spring.kafka.client-id: gateway-hashed + spring.kafka.client-id: gateway consumer: image: juplo/toolbox diff --git a/pom.xml b/pom.xml index 2fa762f..b216f97 100644 --- a/pom.xml +++ b/pom.xml @@ -12,9 +12,9 @@ de.juplo.kafka - sumup-gateway + sumup-gateway--springified REST Gateway for the SumUp-Services - A simple REST-Gateway to talk to the Sumup-Services + A simple REST-Gateway to talk to the Sumup-Services. This is the springified version! 1.0-SNAPSHOT