import com.fasterxml.jackson.databind.ObjectMapper;
import de.juplo.kafka.chat.backend.api.ChatRoomInfoTo;
import de.juplo.kafka.chat.backend.api.MessageTo;
+import de.juplo.kafka.chat.backend.domain.ChatRoomInfo;
import de.juplo.kafka.chat.backend.domain.ShardingStrategy;
import de.juplo.kafka.chat.backend.domain.ChatRoom;
import de.juplo.kafka.chat.backend.domain.Message;
@Override
- public void write(Flux<ChatRoom> chatroomFlux)
+ public void write(Flux<ChatRoomInfo> chatroomFlux)
{
Path path = chatroomsPath();
log.info("Writing chatrooms to {}", path);
package de.juplo.kafka.chat.backend.persistence.storage.mongodb;
import de.juplo.kafka.chat.backend.domain.ChatRoom;
+import de.juplo.kafka.chat.backend.domain.ChatRoomInfo;
import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
private String name;
private List<MessageTo> messages;
- public static ChatRoomTo from(ChatRoom chatroom)
+ public static ChatRoomTo from(ChatRoomInfo chatroom)
{
return new ChatRoomTo(
chatroom.getId().toString(),