NEU
authorKai Moritz <kai@juplo.de>
Thu, 20 Apr 2023 15:10:57 +0000 (17:10 +0200)
committerKai Moritz <kai@juplo.de>
Thu, 20 Apr 2023 15:10:57 +0000 (17:10 +0200)
src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java
src/test/java/de/juplo/kafka/chat/backend/KafkaConfigurationIT.java
src/test/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java

index cb5684c..da58b53 100644 (file)
@@ -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;
   }
 
index 094db39..fc2b7c8 100644 (file)
@@ -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(
index a3dddb1..4350779 100644 (file)
@@ -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,