Skip to content

Instantly share code, notes, and snippets.

@confluentgist
Forked from miguno/topic-as-stream.java
Created January 9, 2020 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save confluentgist/c26c68f18959d1ee8a18a8ac94333d0c to your computer and use it in GitHub Desktop.
Save confluentgist/c26c68f18959d1ee8a18a8ac94333d0c to your computer and use it in GitHub Desktop.
Kafka Streams Example: read a topic as a stream
// Create KStream from Kafka topic.
StreamsBuilder builder = new StreamsBuilder();
KStream<String, String> stream =
builder.stream("input-topic", Consumed.with(Serdes.String(), Serdes.String()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment