- .map((word, count) -> new KeyValue<>(word, WordCount.of(word, count)))
- .to(
- outputTopic,
- Produced.with(
- new JsonSerde<>(Word.class)
- .forKeys()
- .noTypeInfo(),
- new JsonSerde<>(WordCount.class)
- .noTypeInfo()));
+ .map((word, counter) -> new KeyValue<>(word, WordCounter.of(word, counter)))
+ .to(outputTopic);