WIP:refactor: Separated channels for ...
authorKai Moritz <kai@juplo.de>
Fri, 22 Sep 2023 15:43:17 +0000 (17:43 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 22 Sep 2023 15:43:17 +0000 (17:43 +0200)
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesApplicationRunner.java
src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java

index 233e8f6..c860003 100644 (file)
@@ -11,7 +11,7 @@ public class ConsumerTaskRunner
   private final ConsumerTaskExecutor infoChannelConsumerTaskExecutor;
   private final ConsumerTaskExecutor dataChannelConsumerTaskExecutor;
 
-  public void run()
+  public void executeConsumerTasks()
   {
     infoChannelConsumerTaskExecutor.executeConsumerTask();
     dataChannelConsumerTaskExecutor.executeConsumerTask();
index d0151ca..722508b 100644 (file)
@@ -24,7 +24,7 @@ public class KafkaServicesApplicationRunner implements ApplicationRunner
   @Override
   public void run(ApplicationArguments args) throws Exception
   {
-    consumerTaskRunner.run();
+    consumerTaskRunner.executeConsumerTasks();
   }
 
   @PreDestroy
index 256d3f2..c616310 100644 (file)
@@ -57,7 +57,7 @@ public class KafkaTestUtils
     send(messageTemplate, dataTopic, "5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\" : 2, \"user\" : \"peter\", \"text\" : \"Willst du mit mir gehen?\" }", "event_chatmessage_received");
     send(messageTemplate, dataTopic, "5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\" : 1, \"user\" : \"klaus\", \"text\" : \"Ja? Nein? Vielleicht??\" }", "event_chatmessage_received");
 
-    consumerTaskRunner.run();
+    consumerTaskRunner.executeConsumerTasks();
   }
 
   private static void send(