View WordCountDemo.java
// Serializers/deserializers (serde) for String and Long types | |
final Serde<String> stringSerde = Serdes.String(); | |
final Serde<Long> longSerde = Serdes.Long(); | |
// Construct a `KStream` from the input topic "streams-plaintext-input", where message values | |
// represent lines of text (for the sake of this example, we ignore whatever may be stored | |
// in the message keys). | |
KStream<String, String> textLines = builder.stream("streams-plaintext-input", | |
Consumed.with(stringSerde, stringSerde); | |