From 6c22669f67a2c77490478b9a65d262e8038f7ede Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 25 Jan 2023 18:40:24 +0100 Subject: [PATCH] WIP:refactor --- .../java/de/juplo/kafka/chat/backend/domain/ChatRoom.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoom.java b/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoom.java index be22b1cf..878d7888 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoom.java +++ b/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoom.java @@ -66,7 +66,7 @@ public class ChatRoom Message.MessageKey key = Message.MessageKey.of(user, id); - Mono other = service + Mono other = Mono.defer(() -> service .persistMessage(key, LocalDateTime.now(clock), text) .doOnNext(m -> { @@ -75,7 +75,7 @@ public class ChatRoom { log.warn("Emitting of message failed with {} for {}", result.name(), m); } - }); + })); Mono mono = service .getMessage(key) -- 2.20.1