1 package de.juplo.kafka.chat.backend.persistence.storage.nostorage;
3 import de.juplo.kafka.chat.backend.domain.ChatRoomData;
4 import de.juplo.kafka.chat.backend.persistence.StorageStrategy;
5 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
6 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
7 import org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration;
8 import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
9 import org.springframework.context.annotation.Bean;
10 import org.springframework.context.annotation.Configuration;
11 import reactor.core.publisher.Flux;
14 @ConditionalOnProperty(
15 prefix = "chat.backend.inmemory",
16 name = "storage-strategy",
18 matchIfMissing = true)
20 @EnableAutoConfiguration(
22 MongoRepositoriesAutoConfiguration.class,
23 MongoAutoConfiguration.class })
24 public class NoStorageStorageConfiguration
27 public StorageStrategy storageStrategy()
29 return new StorageStrategy()
32 public void write(Flux<ChatRoomData> chatroomFlux) {}
35 public Flux<ChatRoomData> read()