Skip to content

NashTech-Labs/kafka-stateless-kstream.g8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Giter8 template for showcasing stateless stream processing using Kafka KStream by fetching all the hashTags in your tweets.

Kafka Stateless Stream Processing

Steps to install Zookeeper and Apache Kafka:

Step 1: Download Kafka

Download Kafka from here

Step 2: Extract downloaded file

tar -xzvf kafka_2.11-0.10.1.1.tgz
cd kafka_2.11-0.10.1.1

Steps to start Zookeeper and Kafka server :

Start Zookeeper:

bin/zookeeper-server-start.sh config/zookeeper.properties

Start Kafka server:

bin/kafka-server-start.sh config/server.properties

Clone Project

git clone git@github.com:knoldus/activator-stateful-kstream-kafka.git
cd activator-kstream-kafka
bin/activator clean compile

Start producing tweets from your twitter account into a kafka topic

Step 1: Add your twitter authentication tokens in application.conf.

Step 2: Execute the following command,

bin/activator "run-main com.knoldus.demo.TweetProducer"

This starts fetching tweets and push each of it into a Kafka topic queue.


Start processing these tweets using,

Step 1: Execute the following command,

bin/activator "run-main com.knoldus.demo.KStreamDemo"

This begins stream processing on the kafka topic which contains your tweets.

Start consuming all the hash Tags in each tweet,

bin/activator "run-main com.knoldus.demo.ConsumerDemo"

For any issue please raise a ticket @ Github Issue

Template license

Written in 2017 by Knoldus Software LLP

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this template to the public domain worldwide. This template is distributed without any warranty. See http://creativecommons.org/publicdomain/zero/1.0/.