From c64f93de3e59af674885fdad08c521d82f4802d1 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 25 Jun 2021 10:50:02 +0200 Subject: [PATCH] Refined the feedback-messages of the TransferConsumer --- .../kafka/payment/transfer/adapter/TransferConsumer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/juplo/kafka/payment/transfer/adapter/TransferConsumer.java b/src/main/java/de/juplo/kafka/payment/transfer/adapter/TransferConsumer.java index 501bfd0..2ef7ee3 100644 --- a/src/main/java/de/juplo/kafka/payment/transfer/adapter/TransferConsumer.java +++ b/src/main/java/de/juplo/kafka/payment/transfer/adapter/TransferConsumer.java @@ -187,6 +187,7 @@ public class TransferConsumer implements Runnable, ConsumerRebalanceListener // Hence, the app would not react to any signal (CTRL-C, for example) except // a KILL until the restoring is finished. future = CompletableFuture.runAsync(() -> start()); + log.info("start of application completed"); } @@ -304,7 +305,7 @@ public class TransferConsumer implements Runnable, ConsumerRebalanceListener { if (running) { - log.info("already running!"); + log.info("consumer already running!"); return "Already running!"; } @@ -325,7 +326,7 @@ public class TransferConsumer implements Runnable, ConsumerRebalanceListener running = true; future = CompletableFuture.runAsync(this); - log.info("started"); + log.info("consumer started"); return "Started"; } @@ -334,7 +335,7 @@ public class TransferConsumer implements Runnable, ConsumerRebalanceListener { if (!running) { - log.info("not running!"); + log.info("consumer not running!"); return "Not running"; } @@ -359,7 +360,7 @@ public class TransferConsumer implements Runnable, ConsumerRebalanceListener consumer.unsubscribe(); } - log.info("stopped"); + log.info("consumer stopped"); return "Stopped"; } -- 2.20.1