#!/bin/bash
-IMAGE=juplo/counting-consumer:1.0-SNAPSHOT
+IMAGE=juplo/endless-consumer:1.0-SNAPSHOT
if [ "$1" = "cleanup" ]
then
exit
fi
-docker-compose up -d zookeeper kafka cli
+docker-compose up -d zookeeper kafka cli mongo express
if [[
$(docker image ls -q $IMAGE) == "" ||
"$1" = "build"
]]
then
- mvn install || exit
+ docker-compose rm -svf peter beate
+ mvn clean install || exit
else
echo "Using image existing images:"
docker image ls $IMAGE
docker-compose up -d producer
sleep 10
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
+docker-compose stop producer
docker-compose exec -T cli bash << 'EOF'
echo "Altering number of partitions from 3 to 7..."
# tag::altertopic[]
# end::altertopic[]
EOF
-docker-compose restart producer
-sleep 10
-http :8081/seen
+docker-compose start producer
+sleep 1
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
sleep 1
-http :8081/seen
+http -v :8081/state
docker-compose stop producer consumer