splitter: 1.1.1 - The configured default-serde is used for serialization splitter-1.1.1
authorKai Moritz <kai@juplo.de>
Sun, 5 Feb 2023 11:05:33 +0000 (12:05 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 5 Feb 2023 13:41:29 +0000 (14:41 +0100)
- Dropped the specialized configuration for the serialization.
- This variant writes the unnecessary (becuase unused) header `__TypeId__`.

pom.xml
src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java
src/test/resources/logback-test.xml [new file with mode: 0644]

diff --git a/pom.xml b/pom.xml
index abe3a67..4018e22 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
        </parent>
        <groupId>de.juplo.kafka.wordcount</groupId>
        <artifactId>splitter</artifactId>
-       <version>1.1.0</version>
+       <version>1.1.1</version>
        <name>Wordcount-Splitter</name>
        <description>Stream-processor of the multi-user wordcount-example, that splits the sentences up into single words</description>
        <properties>
index 12816ab..5e4930d 100644 (file)
@@ -41,8 +41,6 @@ public class SplitterStreamProcessor
 
                JsonSerde<Recording> recordSerde =
                                new JsonSerde<>(Recording.class).ignoreTypeHeaders();
-               JsonSerde<Word> wordSerde =
-                               new JsonSerde<>(Word.class).noTypeInfo();
 
                KStream<String, Recording> 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 (file)
index 0000000..6f4bdf8
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <include resource="org/springframework/boot/logging/logback/base.xml" />
+    <logger name="de.juplo.kafka.wordcount.splitter" level="DEBUG" />
+</configuration>