Skip to content

Instantly share code, notes, and snippets.


Amit Rathi amit1rrr

View GitHub Profile
amit1rrr /
Created Feb 28, 2018
Word count demo of Apache Kafka.
// 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 ="streams-plaintext-input",
Consumed.with(stringSerde, stringSerde);