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.