spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillermo Ortiz <konstt2...@gmail.com>
Subject How to separate messages of different topics.
Date Tue, 05 May 2015 13:29:50 GMT
I want to read from many topics in Kafka and know from where each message
is coming (topic1, topic2 and so on).

 val kafkaParams = Map[String, String]("metadata.broker.list" ->
"myKafka:9092")
 val topics = Set("EntryLog", "presOpManager")
 val directKafkaStream = KafkaUtils.createDirectStream[String, String,
StringDecoder, StringDecoder](ssc, kafkaParams, topics)

 Is there some way to separate the messages for topics with just one
directStream? or should I create different streamings for each topic?

Mime
View raw message