Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how to fetch twitter tweets and store in kafka

Highlighted

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
Highlighted

Re: how to fetch twitter tweets and store in kafka

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

Highlighted

Re: how to fetch twitter tweets and store in kafka

@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.

Don't have an account?
Coming from Hortonworks? Activate your account here