Created
June 8, 2018 10:40
-
-
Save andybryant/902750a2f3566cdae2edbac94f5076c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StreamsBuilder builder = new StreamsBuilder(); | |
builder | |
.stream("orders") | |
.flatMap(Ops::splitOrders) | |
.to("order-items"); | |
Topology topology = builder.build(); | |
Properties config = new Properties(); | |
config.put(StreamsConfig.APPLICATION_ID_CONFIG, "mySampleApp"); | |
config.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "broker:9092"); | |
config.put(StreamsConfig.NUM_STREAM_THREADS_CONFIG, 8); | |
KafkaStreams streams = new KafkaStreams(topology, config); | |
streams.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment