refactor: Moved extracted the `subscribe()`-call from `StorageStrategy`
[demos/kafka/chat] / src / main / java / de / juplo / kafka / chat / backend / api / ChatBackendController.java
index 529be8d..070abf2 100644 (file)
@@ -128,9 +128,17 @@ public class ChatBackendController
                 .build());
   }
 
+  @GetMapping("/shards")
+  public Mono<String[]> getShardOwners()
+  {
+    return chatHomeService.getShardOwners();
+  }
+
   @PostMapping("/store")
   public void store()
   {
-    storageStrategy.write(chatHomeService);
+    storageStrategy
+        .write(chatHomeService)
+        .subscribe();
   }
 }