From d0ec626f3f7bdf72824b028a8341edf79540f756 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 4 Nov 2022 08:42:48 +0100 Subject: [PATCH] =?utf8?q?unsubscribe()=20im=20Fehlerfall=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/SimpleConsumer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/juplo/kafka/SimpleConsumer.java b/src/main/java/de/juplo/kafka/SimpleConsumer.java index cab2fb8..5557a4d 100644 --- a/src/main/java/de/juplo/kafka/SimpleConsumer.java +++ b/src/main/java/de/juplo/kafka/SimpleConsumer.java @@ -75,7 +75,8 @@ public class SimpleConsumer } catch(Exception e) { - log.error("{} - Unexpected error: {}", id, e.toString()); + log.error("{} - Unexpected error: {}, unsubscribing!", id, e.toString()); + consumer.unsubscribe(); } finally { -- 2.20.1