Skip to content

Simple kafkaspout consumes POJO from kafka to count orders

Notifications You must be signed in to change notification settings

saravana2906/kafkaspout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kafkaspout

Simple kafkaspout consumes Order POJO from kafka and counting order counts

This Application helps to add unique order id counts, which consumes Order POJO from kafka which uses custom deserialiser.
OrderSpout emits orderid to ordercount bolt which has Set object contains received order ids and finally Set size helps us to get ordercount at any moment.
You need producer program also to test this consumer , below is the link
https://github.com/saravana2906/kafkaproducer


I have used same zookeeper instance for kafka and storm.
started the required services in the below order for kafka.
zookeeper
nimbus
supervisor
ui

Don't forget to start the kafka, and once zookeeper started, you can start kafka server.

Then , start the topology which acts as consumer which is never ending process.

Next start the producer you can also have loop to post more orders. producer program given will post only one order and you can see the results in topology execution where , order counts will get printed for every order you receives from kafka.

About

Simple kafkaspout consumes POJO from kafka to count orders

Topics

Resources

Stars

Watchers

Forks

Languages