From: Kai Moritz Date: Sat, 19 Nov 2022 16:04:47 +0000 (+0100) Subject: Vorlage X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=0a23b208086aa3617f75d48e4e1b286cfdf9e64d;p=demos%2Fkafka%2Ftraining Vorlage --- diff --git a/README.sh b/README.sh index d63d229..7bcc996 100755 --- a/README.sh +++ b/README.sh @@ -34,20 +34,13 @@ while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Wait 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[] diff --git a/src/main/java/de/juplo/kafka/SimpleConsumer.java b/src/main/java/de/juplo/kafka/SimpleConsumer.java index cea9568..82d6794 100644 --- a/src/main/java/de/juplo/kafka/SimpleConsumer.java +++ b/src/main/java/de/juplo/kafka/SimpleConsumer.java @@ -56,8 +56,7 @@ public class SimpleConsumer implements Callable } catch(Exception e) { - log.error("{} - Unexpected error: {}, unsubscribing!", id, e.toString()); - consumer.unsubscribe(); + log.error("{} - Unexpected error: {}!", id, e.toString()); return 1; } finally