Following are steps to install and configure KAFKA on Ubuntu:
- Download KAFKA:
wget http://mirror.softaculous.com/apache/kafka/0.10.2.1/kafka_2.10-0.10.2.1.tgz
- Extract downloaded file:
tar -xvzf kafka_2.10-0.10.2.1.tgz
- Goto extracted Kafka folder and start Zookeeper:
./bin/zookeeper-server-start.sh config/zookeeper.properties
- Open another Terminal. Goto extracted Kafka folder and start Kafka:
./bin/kafka-server-start.sh config/server.properties
- Create topic “emailGrabber”
./bin/kafka-topics.sh --create --topic emailGrabber --zookeeper locahost:2181 --partitions 1 --replication-factor 1
- Consumer
./bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic emailGrabber --from beginning
- Producer
./bin/kafka-console-producer.sh --broker-list localhost:9092 --topic emailGrabber
- Check the message sequence order:
> cd /tmp/kafka-logs/emailGrabber > ls > cat *.log
- Happy Coding!
Visit us at datopic, share your business ideas or connect to join datopic ride on data science and cloud and take deep dive into big data solutions.
Your Comment: