refactor: One stream -> using `flatMap` instead of an inner `subscribe`
[demos/kafka/chat] / src / main / java / de / juplo / kafka / chat / backend / implementation / inmemory / SimpleChatHomeService.java
index cf6d20a..5ed039e 100644 (file)
@@ -40,9 +40,10 @@ public class SimpleChatHomeService implements ChatHomeService
       Clock clock,
       int bufferSize)
   {
-    log.info("Created SimpleChatHome for shard {}", shard);
 ;
     this.shard = shard;
+    log.info("Created {}", this);
+
     this.chatRoomInfo = new HashMap<>();
     this.chatRoomData = new HashMap<>();
     storageStrategy
@@ -120,4 +121,10 @@ public class SimpleChatHomeService implements ChatHomeService
   {
     return Mono.empty();
   }
+
+  @Override
+  public String toString()
+  {
+    return SimpleChatHomeService.class.getSimpleName() + ", shard=" + shard;
+  }
 }