From f730e5d76a52b1a427205524abba2446ea829469 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 22 Sep 2023 17:43:17 +0200 Subject: [PATCH] WIP:refactor: Separated channels for ... --- .../chat/backend/implementation/kafka/ConsumerTaskRunner.java | 2 +- .../implementation/kafka/KafkaServicesApplicationRunner.java | 2 +- .../kafka/chat/backend/implementation/kafka/KafkaTestUtils.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java index 233e8f63..c8600039 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java +++ b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java @@ -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(); diff --git a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesApplicationRunner.java b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesApplicationRunner.java index d0151cac..722508bd 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesApplicationRunner.java +++ b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesApplicationRunner.java @@ -24,7 +24,7 @@ public class KafkaServicesApplicationRunner implements ApplicationRunner @Override public void run(ApplicationArguments args) throws Exception { - consumerTaskRunner.run(); + consumerTaskRunner.executeConsumerTasks(); } @PreDestroy diff --git a/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java b/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java index 256d3f2a..c6163101 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java +++ b/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java @@ -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( -- 2.20.1