while ! [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for consumer-1..."; sleep 1; done
while ! [[ $(http 0:8082/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for consumer-2..."; sleep 1; done
-# tag::nachrichten[]
echo 6 | http -v :8080/peter
echo 77 | http -v :8080/klaus
-# end::nachrichten[]
echo "Writing logic error..."
-# tag::logicerror[]
echo 66 | http -v :8080/peter?error=1
-# end::logicerror[]
echo 7 | http -v :8080/klaus
+sleep 5
+docker-compose -f docker/docker-compose.yml stop consumer-1 consumer-2
docker-compose -f docker/docker-compose.yml logs -f consumer-1 consumer-2
-
-echo "Restarting consumer-1..."
-# tag::restart[]
-docker-compose -f docker/docker-compose.yml up consumer-1
-# end::restart[]
}
catch(Exception e)
{
- log.error("{} - Unexpected error: {}, unsubscribing!", id, e.toString());
- consumer.unsubscribe();
+ log.error("{} - Unexpected error: {}!", id, e.toString());
return 1;
}
finally