Is your topic same in both the case?

On Tue, 24 Jul 2018, 19:15 Biswajit Ghosh, <biswaji...@aqbsolutions.com>
wrote:

> Hi team,
>
> I got an issue while integrating with the spark streaming using pyspark, I
> did receive the video stream data in a different consumer subscribe to the
> same topic.
>
> Works fine with this command : *./kafka-console-consumer.sh
> --bootstrap-server <IP_ADDRESS>:9092 --topic spark-streaming-consumer
> --from-beginning*
>
> But not with this :
>
> ​
> >
> def processRecord(record):
>
>         print(record)
>
>
> > ​sc = SparkContext(master="local[2]",appName="HNStreaming")
>
> ​sc.setLogLevel('DEBUG')
>
> ssc = StreamingContext(sc, 2)
>
> topic = "spark-stream-message"
>
> kvs = KafkaUtils.createDirectStream(ssc, [topic], {'metadata.broker.list':
> > brokers})
>
> kvs.foreachRDD(self.processRecord)
>
> ssc.start()
>
> ssc.awaitTermination()
>
> ​
> >
> >
>
> Expecting help from your side asap.
>
> Thank you!
>
>
> --
>
> Regards,
> biswajitGhosh
>

Reply via email to