From 199f10e71fbb759b64d285229dc6cca1ebc43f1b Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 18 Aug 2023 14:47:20 +0200 Subject: [PATCH] NG --- .../de/juplo/kafka/chat/backend/domain/ChatRoomInfo.java | 2 +- .../chat/backend/persistence/kafka/ChatMessageChannel.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoomInfo.java b/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoomInfo.java index 6d88be95..a739e9fa 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoomInfo.java +++ b/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoomInfo.java @@ -8,7 +8,7 @@ import lombok.ToString; import java.util.UUID; -@RequiredArgsConstructor +@RequiredArgsConstructor(staticName = "of") @EqualsAndHashCode(of = { "id" }) @ToString(of = { "id", "name", "shard" }) public class ChatRoomInfo diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatMessageChannel.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatMessageChannel.java index 94f6fa6b..1abfc7f0 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatMessageChannel.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatMessageChannel.java @@ -34,7 +34,7 @@ public class ChatMessageChannel implements Runnable, ConsumerRebalanceListener private final boolean[] isShardOwned; private final long[] currentOffset; private final long[] nextOffset; - private final Map[] chatrooms; + private final Map[] chatrooms; private boolean running; @Getter @@ -308,7 +308,7 @@ public class ChatMessageChannel implements Runnable, ConsumerRebalanceListener Message.MessageKey key = Message.MessageKey.of(chatMessageTo.getUser(), chatMessageTo.getId()); Message message = new Message(key, offset, timestamp, chatMessageTo.getText()); - ChatRoom chatRoom = chatrooms[partition].get(chatRoomId); + ChatRoomInfo chatRoom = chatrooms[partition].get(chatRoomId); KafkaChatRoomService kafkaChatRoomService = (KafkaChatRoomService) chatRoom.getChatRoomService(); @@ -333,7 +333,7 @@ public class ChatMessageChannel implements Runnable, ConsumerRebalanceListener } - private void putChatRoom(ChatRoom chatRoom) + private void putChatRoom(ChatRoomInfo chatRoom) { Integer partition = chatRoom.getShard(); UUID chatRoomId = chatRoom.getId(); -- 2.20.1