WIP:mongodb map vs subscribe
[demos/kafka/chat] / src / main / java / de / juplo / kafka / chat / backend / storage / files / FilesStorageStrategy.java
index 1de0b44..cb7dd31 100644 (file)
@@ -121,9 +121,7 @@ public class FilesStorageStrategy implements StorageStrategy
   @Override
   public void writeChatRoomData(
       UUID chatRoomId,
-      Flux<Message> messageFlux,
-      SuccessCallback successCallback,
-      FailureCallback failureCallback)
+      Flux<Message> messageFlux)
   {
     Path path = chatroomPath(chatRoomId);
     log.info("Writing messages for {} to {}", chatRoomId, path);
@@ -174,12 +172,10 @@ public class FilesStorageStrategy implements StorageStrategy
               throw new RuntimeException(e);
             }
           });
-
-      successCallback.accept(chatRoomId);
     }
     catch (IOException e)
     {
-      failureCallback.accept(chatRoomId, e);
+      throw new RuntimeException(e);
     }
   }