A node client for Kafka. My fork with a fix for #5, since I couldn't wait for pull request for too long
Interact with Kafka, LinkedIn's disk based message queue.
You'll need the libgmp source to compile this package. Under Debian-based systems,
sudo aptitude install libgmp3-dev
On a Mac with Homebrew,
brew install gmp
1 Install kafka
npm install kafka
2 Start zookeeper, kafka server, and a consumer (see http://sna-projects.com/kafka/quickstart.php)
3 Publish and consume some messages!
var kafka = require'kafka'connectsubscribeTopic'test'on'message'console.log"Consumed message:" messagevar producer = connecton'connect'producersend"hey!"producerclose
var consumer =// these are the default valueshost: 'localhost'port: 9092pollInterval: 2000maxSize: 1048576 // 1MBconsumeron'message'console.logmessageconsumerconnectconsumersubscribeTopicname: 'test' partition: 0
var producer =// these are also the default valueshost: 'localhost'port: 9092topic: 'test'partition: 0producerconnectproducersend'message bytes'