From: Kai Moritz Date: Thu, 16 Feb 2023 16:48:52 +0000 (+0100) Subject: counter: 1.2.1 - Simplified topology (no serdes needed for materialization) X-Git-Tag: counter-1.2.1 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=cf177bd69764eb86220cdb871b37435c6c562640;p=demos%2Fkafka%2Fwordcount counter: 1.2.1 - Simplified topology (no serdes needed for materialization) --- diff --git a/pom.xml b/pom.xml index ccdd0fc..f57c829 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ de.juplo.kafka.wordcount counter - 1.2.0 + 1.2.1 Wordcount-Counter Word-counting stream-processor of the multi-user wordcount-example diff --git a/src/main/java/de/juplo/kafka/wordcount/counter/CounterStreamProcessor.java b/src/main/java/de/juplo/kafka/wordcount/counter/CounterStreamProcessor.java index 324e424..bccb253 100644 --- a/src/main/java/de/juplo/kafka/wordcount/counter/CounterStreamProcessor.java +++ b/src/main/java/de/juplo/kafka/wordcount/counter/CounterStreamProcessor.java @@ -61,14 +61,7 @@ public class CounterStreamProcessor .noTypeInfo(), new JsonSerde<>(Word.class) .noTypeInfo())) - .count(Materialized - .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(