1 package de.juplo.kafka.chat.backend.persistence.storage.nostorage;
3 import de.juplo.kafka.chat.backend.domain.ChatRoomInfo;
4 import de.juplo.kafka.chat.backend.domain.Message;
5 import de.juplo.kafka.chat.backend.persistence.StorageStrategy;
6 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
7 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
8 import org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration;
9 import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
10 import org.springframework.context.annotation.Bean;
11 import org.springframework.context.annotation.Configuration;
12 import reactor.core.publisher.Flux;
14 import java.util.UUID;
17 @ConditionalOnProperty(
18 prefix = "chat.backend.inmemory",
19 name = "storage-strategy",
21 matchIfMissing = true)
23 @EnableAutoConfiguration(
25 MongoRepositoriesAutoConfiguration.class,
26 MongoAutoConfiguration.class })
27 public class NoStorageStorageConfiguration
30 public StorageStrategy storageStrategy()
32 return new StorageStrategy()
35 public void writeChatRoomInfo(Flux<ChatRoomInfo> chatRoomInfoFlux) {}
38 public Flux<ChatRoomInfo> readChatRoomInfo()
44 public void writeChatRoomData(UUID chatRoomId, Flux<Message> messageFlux) {}
47 public Flux<Message> readChatRoomData(UUID chatRoomId)