Gewollten Fehler im Consumer von `first-contact` korrigiert
authorKai Moritz <kai@juplo.de>
Tue, 23 May 2023 19:46:05 +0000 (21:46 +0200)
committerKai Moritz <kai@juplo.de>
Tue, 23 May 2023 19:46:05 +0000 (21:46 +0200)
src/main/java/de/juplo/kafka/SimpleConsumer.java

index ca8d1db..d8f3624 100644 (file)
@@ -79,7 +79,8 @@ public class SimpleConsumer
     }
     catch(WakeupException e)
     {
-      log.info("{} - RIIING!", id);
+      log.info("{} - Closing the KafkaConsumer", id);
+      consumer.close();
     }
     catch(Exception e)
     {
@@ -87,11 +88,10 @@ public class SimpleConsumer
     }
     finally
     {
+      log.info("{} - Shutting down...");
       this.lock.lock();
       try
       {
-        log.info("{} - Closing the KafkaConsumer", id);
-        consumer.close();
         log.info("{} - DONE!");
         stopped.signal();
       }