refactor: Moved exceptions into package `exceptions` - Aligned Code
[demos/kafka/chat] / src / main / java / de / juplo / kafka / chat / backend / persistence / inmemory / InMemoryServicesConfiguration.java
index 106c736..d2fd731 100644 (file)
@@ -2,6 +2,7 @@ package de.juplo.kafka.chat.backend.persistence.inmemory;
 
 import de.juplo.kafka.chat.backend.ChatBackendProperties;
 import de.juplo.kafka.chat.backend.domain.ChatHome;
+import de.juplo.kafka.chat.backend.persistence.ShardingStrategy;
 import de.juplo.kafka.chat.backend.persistence.StorageStrategy;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.context.annotation.Bean;
@@ -31,7 +32,7 @@ public class InMemoryServicesConfiguration
       Clock clock)
   {
     return new SimpleChatHome(
-        storageStrategy.read(),
+        storageStrategy,
         clock,
         properties.getChatroomBufferSize());
   }
@@ -52,7 +53,7 @@ public class InMemoryServicesConfiguration
         .of(properties.getInmemory().getOwnedShards())
         .forEach(shard -> chatHomes[shard] = new SimpleChatHome(
             shard,
-            storageStrategy.read(),
+            storageStrategy,
             clock,
             properties.getChatroomBufferSize()));
     ShardingStrategy strategy = new KafkaLikeShardingStrategy(numShards);