fi
docker-compose up -d zookeeper kafka-1 kafka-2 kafka-3 cli
+docker-compose rm -svf gateway gateway-0 gateway-1
if [[
$(docker image ls -q $IMAGE) == "" ||
"$1" = "build"
]]
then
- docker-compose rm -svf gateway gateway-0 gateway-1
mvn clean install || exit
else
echo "Using image existing images:"
while ! [[ $(http 0:8082/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway..."; sleep 1; done
-echo foo | http -v :8082/peter
-echo bar | http -v :8082/klaus
+echo 666 | http -v :8082/peter
+echo 666 | http -v :8082/klaus
+echo foo | http -v :8082/foo
+
while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway-0..."; sleep 1; done
while ! [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway-1..."; sleep 1; done
-echo FOO | http -v :8080/peter
-echo BAR | http -v :8081/klaus
+echo 66 | http -v :8080/peter
+echo 66 | http -v :8081/klaus
docker-compose stop consumer
docker-compose logs consumer
image: juplo/toolbox
command: sleep infinity
- gateway-partition-0:
+ gateway-0:
image: juplo/sumup-gateway--springified:1.0-SNAPSHOT
ports:
- 8080:8080
environment:
server.port: 8080
- spring-kafka.bootstrap-servers: kafka:9092
+ spring.kafka.bootstrap-servers: kafka:9092
spring.kafka.client-id: gateway-0
sumup.gateway.partition: 0
- gateway-0:
+ gateway-1:
image: juplo/sumup-gateway--springified:1.0-SNAPSHOT
ports:
- 8081:8080
environment:
server.port: 8080
- spring-kafka.bootstrap-servers: kafka:9092
+ spring.kafka.bootstrap-servers: kafka:9092
spring.kafka.client-id: gateway-1
sumup.gateway.partition: 1
- 8082:8080
environment:
server.port: 8080
- spring-kafka.bootstrap-servers: kafka:9092
+ spring.kafka.bootstrap-servers: kafka:9092
spring.kafka.client-id: gateway
consumer:
+sumup:
+ gateway:
+ topic: test
management:
endpoint:
shutdown:
group-id: ${spring.kafka.consumer.group-id}
auto-offset-reset: ${spring.kafka.consumer.auto-offset-reset}
auto-commit-interval-ms: ${spring.kafka.consumer.properties.auto.commit.interval.ms}
- topic: ${spring.kafka.template.default-topic}
+ topic: ${sumup.gateway.topic}
acks: ${spring.kafka.producer.acks}
batch-size: ${spring.kafka.producer.batch-size}
linger-ms: ${spring.kafka.producer.properties.linger.ms}