From 832c8ed50217ce40734ca9c5e326263f89567177 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 20 Apr 2023 17:10:57 +0200 Subject: [PATCH] NEU --- .../juplo/kafka/chat/backend/ChatBackendProperties.java | 3 ++- .../de/juplo/kafka/chat/backend/KafkaConfigurationIT.java | 8 ++++---- .../persistence/kafka/KafkaServicesConfiguration.java | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java index cb5684c2..da58b530 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java +++ b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java @@ -36,7 +36,8 @@ public class ChatBackendProperties { private String clientIdPrefix; private String bootstrapServers = ":9092"; - private String topic = "test"; + private String chatroomChannelTopic = "chatroom_channel"; + private String messageChannelTopic = "message_channel"; private int numPartitions = 2; } diff --git a/src/test/java/de/juplo/kafka/chat/backend/KafkaConfigurationIT.java b/src/test/java/de/juplo/kafka/chat/backend/KafkaConfigurationIT.java index 094db395..fc2b7c89 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/KafkaConfigurationIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/KafkaConfigurationIT.java @@ -20,14 +20,14 @@ import static de.juplo.kafka.chat.backend.KafkaConfigurationIT.MESSAGES_TOPIC; "chat.backend.kafka.client-id-PREFIX=TEST", "chat.backend.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}", "spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}", - "chat.backend.kafka.chatrooms-topic=" + CHATROOMS_TOPIC, - "chat.backend.kafka.messages-topic=" + MESSAGES_TOPIC, + "chat.backend.kafka.chatroom-channel-topic=" + CHATROOMS_TOPIC, + "chat.backend.kafka.message-channel-topic=" + MESSAGES_TOPIC, "chat.backend.kafka.num-partitions=3" }) @EmbeddedKafka(topics = { CHATROOMS_TOPIC, MESSAGES_TOPIC }, partitions = 3) class KafkaConfigurationIT extends AbstractConfigurationIT { - final static String CHATROOMS_TOPIC = "TEST_CHAT_ROOMS"; - final static String MESSAGES_TOPIC = "TEST_CHAT_MESSAGES"; + final static String CHATROOMS_TOPIC = "TEST_CHATROOM_CHANNEL"; + final static String MESSAGES_TOPIC = "TEST_MESSAGE_CHANNEL"; @BeforeAll public static void test( diff --git a/src/test/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java b/src/test/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java index a3dddb1b..43507792 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java +++ b/src/test/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java @@ -58,7 +58,7 @@ public class KafkaServicesConfiguration Clock clock) { return new ChatRoomChannel( - properties.getKafka().getTopic(), + properties.getKafka().getChatroomChannelTopic(), chatRoomChannelProducer, chatRoomChannelConsumer, shardingStrategy, @@ -155,7 +155,7 @@ public class KafkaServicesConfiguration ZoneId zoneId) { return new ChatMessageChannel( - properties.getKafka().getTopic(), + properties.getKafka().getMessageChannelTopic(), chatMessageChannelProducer, chatMessageChannelConsumer, zoneId, -- 2.20.1