top10: 1.2.1 - Simplified setup of `Top10StreamProcessorToplogyTest`
[demos/kafka/wordcount] / src / main / java / de / juplo / kafka / wordcount / top10 / Top10ApplicationConfiguration.java
index bb6fef7..5e56066 100644 (file)
@@ -13,11 +13,10 @@ import org.springframework.context.annotation.Configuration;
 import org.springframework.kafka.support.serializer.JsonDeserializer;
 import org.springframework.kafka.support.serializer.JsonSerde;
 
-import java.util.HashMap;
-import java.util.Map;
 import java.util.Properties;
 import java.util.concurrent.CompletableFuture;
 
+import static de.juplo.kafka.wordcount.top10.Top10StreamProcessor.STORE_NAME;
 import static org.apache.kafka.streams.errors.StreamsUncaughtExceptionHandler.StreamThreadExceptionResponse.SHUTDOWN_CLIENT;
 
 
@@ -45,9 +44,9 @@ public class Top10ApplicationConfiguration
                return props;
        }
 
-       static Map<String, Object> serializationConfig()
+       static Properties serializationConfig()
        {
-               Map<String, Object> props = new HashMap<>();
+               Properties props = new Properties();
 
                props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, JsonSerde.class.getName());
                props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, JsonSerde.class.getName());
@@ -94,6 +93,6 @@ public class Top10ApplicationConfiguration
        @Bean
        public KeyValueBytesStoreSupplier storeSupplier()
        {
-               return Stores.persistentKeyValueStore("top10");
+               return Stores.persistentKeyValueStore(STORE_NAME);
        }
 }