#!/bin/bash
-IMAGE=juplo/supersimple:1.0-SNAPSHOT
+IMAGE=juplo/supersimple-consumer:1.0-SNAPSHOT
if [ "$1" = "cleanup" ]
then
exit
fi
-docker-compose rm -svf supersimple
+docker-compose rm -svf consumer
docker-compose up -d zookeeper kafka-1 kafka-2 kafka-3 cli
if [[
"$1" = "build"
]]
then
- docker-compose rm -svf supersimple
+ docker-compose rm -svf consumer
mvn clean install || exit
else
echo "Using image existing images:"
echo "Waiting for the Kafka-Cluster to become ready..."
docker-compose exec cli cub kafka-ready -b kafka:9092 1 60 > /dev/null 2>&1 || exit 1
docker-compose up setup
-docker-compose up -d gateway requests-1 requests-2 supersimple
+docker-compose up -d gateway requests-1 requests-2 consumer
while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway..."; sleep 1; done
while ! [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for requests-1..."; sleep 1; done
sleep 10
-docker-compose logs supersimple
+docker-compose logs consumer
sumup.requests.bootstrap-server: kafka:9092
sumup.requests.client-id: requests-2
- supersimple:
- image: juplo/supersimple:1.0-SNAPSHOT
+ consumer:
+ image: juplo/supersimple-consumer:1.0-SNAPSHOT
ports:
- 8090:8080
environment:
server.port: 8080
spring.kafka.bootstrap-servers: kafka:9092
spring.kafka.producer.bootstrap-servers: kafka:9092
- spring.kafak.client-id: supersimple
+ spring.kafak.client-id: consumer
logging.level.org.apache.kafka.clients.consumer: INFO
</parent>
<groupId>de.juplo.kafka</groupId>
- <artifactId>supersimple</artifactId>
+ <artifactId>supersimple-consumer</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Supersimple Consumer-Group</name>
<description>Most minimal Consumer-Group ever!</description>