Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

how to fetch twitter tweets and store in kafka

Expert Contributor

hello,

Iam using hortonworks. i want to fetch tweets and want to store in kafka topic.

I tried using kafka producer api in java but tweets are not getting stored in kafka topic only displays on eclipse console. Is there any way to fetch tweets from command line only ?

2 REPLIES 2

Hi @heta desai,

If you are able to produce the tweets to the topic, then you can use a kafka consumer to read tweets from the topic.

If you want to read from command line, you can read it using stdin.

Thanks,

Aditya

@heta desai

Another option is to use the GetTwitter processor in NiFi, part of HDF, and then use the PublishKafka processor to publish the messages to Kafka.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.