Launch:
Start the zookeeper server:
/usr/local/zookeeper/bin/zkServer.sh start
Start kafka server:
/usr/local/kafka/bin/kafka-server-start.sh /usr/local/kafka/config/server.properties
Create a topic "tweets" in kafka:
/usr/local/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic tweets
Check if topic has been created:
/usr/local/kafka/bin/kafka-topics.sh --list --zookeeper localhost:2181
We can now run the KafkaTwitterProducer and the storm topology KafkaTwitterTopology in eclipse in Local mode.
The twitter oAuth tokens, the Kafka topic name and the keywords have to be passed as arguments to the Kafka producer: