WIP
authorKai Moritz <kai@juplo.de>
Wed, 13 Sep 2023 21:23:46 +0000 (23:23 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 13 Sep 2023 21:23:46 +0000 (23:23 +0200)
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java
src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaChatHomeServiceTest.java

index a98e46e..c7cc6ad 100644 (file)
@@ -89,7 +89,6 @@ public class InfoChannel implements Runnable
         {
           log.info("Successfully sent chreate-request for chat room: {}", to);
           ChatRoomInfo chatRoomInfo = new ChatRoomInfo(chatRoomId, name, record.partition());
-          createChatRoom(chatRoomInfo);
           sink.success(chatRoomInfo);
         }
         else
index cf097f8..b8d7e4b 100644 (file)
@@ -80,7 +80,7 @@ public class KafkaChatHomeServiceTest extends ChatHomeServiceWithShardsTest
   @BeforeAll
   public static void sendAndLoadStoredData(@Autowired KafkaTemplate<String, String> messageTemplate)
   {
-    send(messageTemplate, INFO_TOPIC, "5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\": \"5c73531c-6fc4-426c-adcb-afc5c140a0f7\", \"name\": \"FOO\" }", "event_chatroom_created");
+    send(messageTemplate, INFO_TOPIC, "5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\": \"5c73531c-6fc4-426c-adcb-afc5c140a0f7\", \"shard\": 2, \"name\": \"FOO\" }", "event_chatroom_created");
     send(messageTemplate, DATA_TOPIC, "5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\" : 1, \"user\" : \"peter\", \"text\" : \"Hallo, ich heiße Peter!\" }", "event_chatmessage_received");
     send(messageTemplate, DATA_TOPIC, "5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\" : 1, \"user\" : \"ute\", \"text\" : \"Ich bin Ute...\" }", "event_chatmessage_received");
     send(messageTemplate, DATA_TOPIC, "5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\" : 2, \"user\" : \"peter\", \"text\" : \"Willst du mit mir gehen?\" }", "event_chatmessage_received");