top10: 1.2.1 - (RED) Fixed de-/serialization, turned of caching in IT
[demos/kafka/wordcount] / src / main / java / de / juplo / kafka / wordcount / top10 / Top10ApplicationConfiguration.java
index 6f18339..000db01 100644 (file)
@@ -38,13 +38,15 @@ public class Top10ApplicationConfiguration
                props.put(
                                JsonDeserializer.TYPE_MAPPINGS,
                                "word:" + Key.class.getName() + "," +
-                               "counter:" + Entry.class.getName());
-               props.put(JsonDeserializer.REMOVE_TYPE_INFO_HEADERS, Boolean.FALSE);
-               props.put(
-                               JsonSerializer.TYPE_MAPPINGS,
+                               "counter:" + Entry.class.getName() + "," +
                                "user:" + User.class.getName() + "," +
                                "ranking:" + Ranking.class.getName());
                props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
+               if (properties.getCommitInterval() != null)
+                       props.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, properties.getCommitInterval());
+               if (properties.getCacheMaxBytes() != null)
+                       props.put(StreamsConfig.STATESTORE_CACHE_MAX_BYTES_CONFIG, properties.getCacheMaxBytes());
+               props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
 
                return props;
        }