From: Kai Moritz Date: Tue, 29 Aug 2023 17:02:28 +0000 (+0200) Subject: FIX:KAfkaChatHomeTEst X-Git-Tag: rebase--2023-09-02--10-22~8 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=c269710383abc944d1a8dae49d78754d9c2946ba;p=demos%2Fkafka%2Fchat FIX:KAfkaChatHomeTEst --- diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java index 7659d1e1..10d26baa 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java @@ -372,12 +372,12 @@ public class ChatRoomChannel implements Runnable, ConsumerRebalanceListener { if (loadInProgress) { - throw new LoadInProgressException(shard); + return Mono.error(new LoadInProgressException(shard)); } if (!isShardOwned[shard]) { - throw new ShardNotOwnedException(shard); + return Mono.error(new ShardNotOwnedException(shard)); } return Mono.justOrEmpty(chatrooms[shard].get(id));