Last active
March 25, 2020 09:41
-
-
Save pavangadagi/0add2aac50066d8b1eb9b1e94b9f64cf 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
Set<String> topicSet = new HashSet<String>(Arrays.asList(topics.split(","))); | |
JavaInputDStream<ConsumerRecord<String,JsonNode>> streams = KafkaUtils.createDirectStream( | |
streamingContext, | |
LocationStrategies.PreferConsistent(), | |
ConsumerStrategies.Subscribe(topicSet, kafkaParams)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment