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

index 822f530..094db39 100644 (file)
@@ -17,7 +17,7 @@ import static de.juplo.kafka.chat.backend.KafkaConfigurationIT.MESSAGES_TOPIC;
     webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
     properties = {
         "chat.backend.services=kafka",
-        "chat.backend.kafka.client-id=TEST",
+        "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,
index b0e7776..a3dddb1 100644 (file)
@@ -112,7 +112,7 @@ public class KafkaServicesConfiguration
     defaultConsumerProperties.forEach((key, value) -> properties.put(key.toString(), value));
     properties.put(
         ConsumerConfig.CLIENT_ID_CONFIG,
-        chatBackendProperties.getKafka().getClientIdPrefix() + "_MESSAGE_CHANNEL_CONSUMER");
+        chatBackendProperties.getKafka().getClientIdPrefix() + "_CHATROOM_CHANNEL_CONSUMER");
     properties.put(
         ConsumerConfig.GROUP_ID_CONFIG,
         "chat_room_channel");
@@ -253,9 +253,6 @@ public class KafkaServicesConfiguration
     properties.setProperty(
         ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
         chatBackendProperties.getKafka().getBootstrapServers());
-    properties.setProperty(
-        ConsumerConfig.CLIENT_ID_CONFIG,
-        chatBackendProperties.getKafka().getClientIdPrefix());
     properties.setProperty(
         ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG,
         "false");