cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to read data from kafka topic using spark streaming

scholar
New Contributor II

I have installed kafka-2.10-0.10.2.

And using cluster with configuration: Runtime :6.4 Extended Support( scala 2.11,Spark 2.4.5)

After this i am able to get mesgage son producer and consumer

But when i try to read data from spark.readsttream and try to write it on console. It doesnot show any response. Even dont give any error

Attaching the sccreenshot of the issue

Here i dnt get any response even.. i check in driver logs tooo

Open to all suggeztion

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz
Community Manager
Community Manager

Hi @shreyshi Gupta​ ,

  • Please go through this documentation from Databricks to explain how you can perform complex streaming analytics using Apache Spark™. Specifically, you can go through the below topics.
  1. Reading Records from Kafka topics.
  2. Using Spark as a Kafka Producer

  • Also, here, you find a Spark Streaming example using rate source and console sink.

Please reach out to me if you have any issues while resolving your query.

View solution in original post

5 REPLIES 5

Hubert-Dudek
Esteemed Contributor III

You can just use display(orders_df3) for debugging purposes

I tried this too. It also not working for me

Do we need to add any jar or library to run this

What is the error message you are getting? could you share more details please

Kaniz
Community Manager
Community Manager

Hi @shreyshi Gupta​ ,

  • Please go through this documentation from Databricks to explain how you can perform complex streaming analytics using Apache Spark™. Specifically, you can go through the below topics.
  1. Reading Records from Kafka topics.
  2. Using Spark as a Kafka Producer

  • Also, here, you find a Spark Streaming example using rate source and console sink.

Please reach out to me if you have any issues while resolving your query.

Kaniz
Community Manager
Community Manager

Hi @shreyshi Gupta​ , We haven’t heard from you on the last response from me, and I was checking back to see if you have a resolution yet. If you have any solution, please share it with the community as it can be helpful to others. Otherwise, we will respond with more details and try to help.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.