WIP
[demos/kafka/wordcount] / src / main / java / de / juplo / kafka / wordcount / top10 / Top10ApplicationConfiguration.java
index 213f565..ae161d8 100644 (file)
@@ -1,6 +1,5 @@
 package de.juplo.kafka.wordcount.top10;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.kafka.clients.consumer.ConsumerConfig;
 import org.apache.kafka.streams.StreamsConfig;
@@ -36,7 +35,7 @@ public class Top10ApplicationConfiguration
                props.put(JsonSerializer.ADD_TYPE_INFO_HEADERS, false);
                props.put(JsonDeserializer.TRUSTED_PACKAGES, Top10Application.class.getPackageName());
                props.put(JsonDeserializer.KEY_DEFAULT_TYPE, Word.class.getName());
-               props.put(JsonDeserializer.VALUE_DEFAULT_TYPE, WordCount.class.getName());
+               props.put(JsonDeserializer.VALUE_DEFAULT_TYPE, Counter.class.getName());
                props.put(JsonDeserializer.USE_TYPE_INFO_HEADERS, false);
                props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
 
@@ -46,14 +45,12 @@ public class Top10ApplicationConfiguration
        @Bean(initMethod = "start", destroyMethod = "stop")
        public Top10StreamProcessor streamProcessor(
                        Top10ApplicationProperties applicationProperties,
-                       ObjectMapper objectMapper,
                        Properties streamProcessorProperties,
                        ConfigurableApplicationContext context)
        {
                Top10StreamProcessor streamProcessor = new Top10StreamProcessor(
                                applicationProperties.getInputTopic(),
                                applicationProperties.getOutputTopic(),
-                               objectMapper,
                                streamProcessorProperties);
 
                streamProcessor.streams.setUncaughtExceptionHandler((Throwable e) ->