+sleep 5
+docker-compose exec -T cli bash << 'EOF'
+echo "Writing poison pill into topic test..."
+# tag::poisonpill[]
+echo 'BOOM!' | kafkacat -P -b kafka:9092 -t test
+# end::poisonpill[]
+EOF
+while [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Consumer is still running..."; sleep 1; done
+http -v :8081/actuator/health
+echo "Restarting consumer"
+http -v post :8081/start
+while ! [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for consumer..."; sleep 1; done
+while [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Consumer is still running..."; sleep 1; done
+http -v :8081/actuator/health
+http -v post :8081/actuator/shutdown
+docker-compose stop producer
+docker-compose ps
+docker-compose logs --tail=100 consumer