Skip to content

Instantly share code, notes, and snippets.

@miguno
Last active January 9, 2020 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save miguno/6c4a5704f7e4365d3869b221cc7da8e1 to your computer and use it in GitHub Desktop.
Save miguno/6c4a5704f7e4365d3869b221cc7da8e1 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