Experimente zu acks-0 aus der Übung entfernt, weil sie nicht funzten
[demos/kafka/training] / README.sh
index 8b568c9..405b639 100755 (executable)
--- a/README.sh
+++ b/README.sh
@@ -9,7 +9,7 @@ then
   exit
 fi
 
-docker-compose up -d zookeeper kafka cli
+docker-compose up -d zookeeper kafka-1 kafka-2 kafka-3 cli
 
 if [[
   $(docker image ls -q $IMAGE) == "" ||
@@ -23,77 +23,26 @@ else
 fi
 
 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 exec cli cub kafka-ready -b kafka:9092 3 60 > /dev/null 2>&1 || exit 1
 docker-compose up setup
-
 docker-compose up -d
 
-sleep 15
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
+sleep 10
 
-http post :8081/stop
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
+echo foo | http -v :8081/foo-acks-1
+echo foo | http -v :8082/foo-acks-all
+http -v :8000/seen
 
-http post :8081/start
+docker-compose stop kafka-1
 
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
+echo bar | http -v :8081/bar-acks-1
+echo bar | http -v :8082/bar-acks-all
+http -v :8000/seen
 
-http post :8081/stop
-http :8081/status
-http post :8082/stop
-http :8082/status
-http post :8083/stop
-http :8083/status
-http post :8084/stop
-http :8084/status
-http post :8085/stop
-http :8085/status
+docker-compose stop kafka-3
 
-http :8000/seen
-http post :8000/stop
+echo foobar | http -v :8081/foobar-acks-1
+echo foobar | http -v :8082/foobar-acks-all
+http -v :8000/seen
 
-docker-compose logs producer
+docker-compose stop acks-all acks-1 consumer