From: Kai Moritz Date: Sun, 5 Feb 2023 11:05:33 +0000 (+0100) Subject: splitter: 1.1.1 - The configured default-serde is used for serialization X-Git-Tag: splitter-1.1.1 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=5a5616b76c58e030a0529426d281548bdf1d835f;p=demos%2Fkafka%2Fwordcount splitter: 1.1.1 - The configured default-serde is used for serialization - Dropped the specialized configuration for the serialization. - This variant writes the unnecessary (becuase unused) header `__TypeId__`. --- diff --git a/pom.xml b/pom.xml index abe3a67..4018e22 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ de.juplo.kafka.wordcount splitter - 1.1.0 + 1.1.1 Wordcount-Splitter Stream-processor of the multi-user wordcount-example, that splits the sentences up into single words diff --git a/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java index 12816ab..5e4930d 100644 --- a/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java +++ b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java @@ -41,8 +41,6 @@ public class SplitterStreamProcessor JsonSerde recordSerde = new JsonSerde<>(Recording.class).ignoreTypeHeaders(); - JsonSerde wordSerde = - new JsonSerde<>(Word.class).noTypeInfo(); KStream source = builder.stream( properties.getInputTopic(), @@ -53,7 +51,7 @@ public class SplitterStreamProcessor .stream(PATTERN.split(recording.getSentence())) .map(word -> Word.of(recording.getUser(), word)) .toList()) - .to(properties.getOutputTopic(), Produced.with(Serdes.String(), wordSerde)); + .to(properties.getOutputTopic()); Properties props = new Properties(); props.put(StreamsConfig.APPLICATION_ID_CONFIG, properties.getApplicationId()); diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml new file mode 100644 index 0000000..6f4bdf8 --- /dev/null +++ b/src/test/resources/logback-test.xml @@ -0,0 +1,5 @@ + + + + +