-docker-compose stop producer peter beate
-docker-compose logs beate
-docker-compose logs --tail=10 peter
+while ! [[ $(http 0:8091/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for adder-1..."; sleep 1; done
+while ! [[ $(http 0:8092/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for adder-2..."; sleep 1; done
+
+# tag::nachrichten[]
+echo 6 | http -v :8080/peter
+echo 6 | http -v :8080/klaus
+# end::nachrichten[]
+
+while [[ "$(http :8091/results | jq -r .)" == "{}" ]]; do echo "Waiting for some results to show up on adder-1..."; sleep 1; done
+echo "Resultate für adder-1"
+# tag::resultate[]
+http -v :8091/results
+# end::resultate[]
+
+while [[ "$(http :8092/results | jq -r .)" == "{}" ]]; do echo "Waiting for some results to show up on adder-2..."; sleep 1; done
+echo "Resultate für adder-2"
+# tag::resultate[]
+http -v :8092/results
+# end::resultate[]
+
+echo "Writing poison pill into topic out..."
+# tag::poisonpill[]
+echo 'BOOM!' | kafkacat -P -b :9092 -t out
+# end::poisonpill[]
+
+sleep 5
+echo "Resultate & Status für adder-1"
+http -v :8091/results
+http -v :8091/actuator/health
+echo "Resultate & Status für adder-2"
+http -v :8092/results
+http -v :8092/actuator/health
+
+echo "Restarting adder-1"
+# tag::restart[]
+http post :8091/start
+# end::restart[]
+echo "Restarting adder-2"
+# tag::restart[]
+http post :8092/start
+# end::restart[]
+
+sleep 5
+echo "Resultate & Status für adder-1"
+http -v :8091/results
+http -v :8091/actuator/health
+echo "Resultate & Status für adder-2"
+http -v :8092/results
+http -v :8092/actuator/health