Integrating NODEJS and Kafka
Table of Contents
- Integrating NODEJS and Kafka
- Installing KAFKA Single Node - Quick Start.
- Installing NodeJS on Centos 6.6.
- Installing
nodejs
andnpm
on centos is very simple. - Installing
gcc-c++
andmake
. - Later on we will need
kafka-node
lets install that as well. - Lets do a test.
- Lets make some simple changes to exsisting script to handle JSON.
- NodeJS Kafka Producer - Using
kafka-node
- Step 1 - Copy the below script in a file called
producer_nodejs.js
. - Step 2 - Start the
kafka
cluster as we already did inInstallation of Kafka
. Assuming topic astest
- Step 3 - Start the consumer service as in the below command.
- Step 4 - Execute below command. This will send
This is the First Message I am sending
Message to the Kafka consumer. - Step 5 - Check on the consumer you will see the message sent from
nodejs
.
- Step 1 - Copy the below script in a file called
- Sending JSON to NodeJS to Kafka.
- Installing
Complete information about integrating and Installing Kafka/NodeJS on Centos. This is just a combination of multiple post in the blog.
http://whatizee.blogspot.com/2015/02/installing-kafka-single-node-quick-start.html http://whatizee.blogspot.com/2015/02/installing-nodejs-on-centos-66.html
http://whatizee.blogspot.com/2015/02/nodejs-kafka-producer-using-kafka-node.html
http://whatizee.blogspot.com/2015/02/sending-json-nodejs-kafka.html
http://whatizee.blogspot.com/2015/02/sending-json-to-nodejs-to-multiple.html
Comments
Post a Comment