1 package de.juplo.kafka.chat.backend.persistence.storage.nostorage;
3 import com.fasterxml.jackson.databind.ObjectMapper;
4 import de.juplo.kafka.chat.backend.ChatBackendProperties;
5 import de.juplo.kafka.chat.backend.domain.ChatRoom;
6 import de.juplo.kafka.chat.backend.domain.ShardingStrategy;
7 import de.juplo.kafka.chat.backend.persistence.StorageStrategy;
8 import de.juplo.kafka.chat.backend.persistence.inmemory.InMemoryChatRoomService;
9 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
10 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
11 import org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration;
12 import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
13 import org.springframework.context.annotation.Bean;
14 import org.springframework.context.annotation.Configuration;
15 import reactor.core.publisher.Flux;
17 import java.nio.file.Paths;
18 import java.time.Clock;
21 @ConditionalOnProperty(
22 prefix = "chat.backend.inmemory",
23 name = "storage-strategy",
25 matchIfMissing = true)
27 @EnableAutoConfiguration(
29 MongoRepositoriesAutoConfiguration.class,
30 MongoAutoConfiguration.class })
31 public class NoStorageStorageConfiguration
34 public StorageStrategy storageStrategy()
36 return new StorageStrategy()
39 public void write(Flux<ChatRoom> chatroomFlux) {}
42 public Flux<ChatRoom> read()