counter: 1.2.1 - Simplified topology (no serdes needed for materialization) counter-1.2.1
authorKai Moritz <kai@juplo.de>
Thu, 16 Feb 2023 16:48:52 +0000 (17:48 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 17 Feb 2023 17:04:33 +0000 (18:04 +0100)
pom.xml
src/main/java/de/juplo/kafka/wordcount/counter/CounterStreamProcessor.java

diff --git a/pom.xml b/pom.xml
index ccdd0fc..f57c829 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
        </parent>
        <groupId>de.juplo.kafka.wordcount</groupId>
        <artifactId>counter</artifactId>
-       <version>1.2.0</version>
+       <version>1.2.1</version>
        <name>Wordcount-Counter</name>
        <description>Word-counting stream-processor of the multi-user wordcount-example</description>
        <properties>
index 324e424..bccb253 100644 (file)
@@ -61,14 +61,7 @@ public class CounterStreamProcessor
                                                                .noTypeInfo(),
                                                new JsonSerde<>(Word.class)
                                                                .noTypeInfo()))
-                               .count(Materialized
-                                               .<Word,Long>as(storeSupplier)
-                                               .withKeySerde(
-                                                               new JsonSerde<>(Word.class)
-                                                                               .forKeys()
-                                                                               .noTypeInfo())
-                                               .withValueSerde(
-                                                               Serdes.Long()))
+                               .count(Materialized.as(storeSupplier))
                                .toStream()
                                .map((word, count) -> new KeyValue<>(word, WordCount.of(word.getUser(), word.getWord(), count)))
                                .to(