WIP
authorKai Moritz <kai@juplo.de>
Mon, 5 Sep 2022 16:37:56 +0000 (18:37 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 5 Sep 2022 16:37:56 +0000 (18:37 +0200)
README.sh
docker-compose.yml
pom.xml

index 25b8f62..3da5bbe 100755 (executable)
--- 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
index 5400911..f4b271f 100644 (file)
@@ -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 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -12,9 +12,9 @@
   </parent>
 
   <groupId>de.juplo.kafka</groupId>
-  <artifactId>sumup-gateway</artifactId>
+  <artifactId>sumup-gateway--springified</artifactId>
   <name>REST Gateway for the SumUp-Services</name>
-  <description>A simple REST-Gateway to talk to the Sumup-Services</description>
+  <description>A simple REST-Gateway to talk to the Sumup-Services. This is the springified version!</description>
   <version>1.0-SNAPSHOT</version>
 
   <dependencies>