From: Kai Moritz Date: Thu, 20 Apr 2023 15:10:57 +0000 (+0200) Subject: NEU X-Git-Tag: rebase--2023-08-18~8 X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=832c8ed50217ce40734ca9c5e326263f89567177;p=demos%2Fkafka%2Fchat NEU --- 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,