From: Kai Moritz Date: Tue, 29 Aug 2023 17:02:28 +0000 (+0200) Subject: FIX:KAfkaChatHomeTEst X-Git-Tag: rebase--2023-08-29--19-04 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=2da10622fc20cbaa515d62888473181dfa462c48;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));