0.0.15 • Published 11 years ago

kafka-zookeeper v0.0.15

Weekly downloads
46
License
-
Repository
github
Last release
11 years ago

node-kafka-zookeeper

A high-level client library in Node.js for the Apache Kafka project with Zookeeper integration

Kafka is a persistent, efficient, distributed publish/subscribe messaging system.
Prozess is a Kafka client library used for low-level access from node-kafka-zookeeper.

##Consumer example:

A Zookeeper object handles broker enumeration and offset storage

var Zookeeper = require('kafka-zookeeper').Zookeeper;
var zk = new Zookeeper({
  host: 'kafka00.lan',
  port: 2181
});

var onMessages = function(messages, error, cb) {
  if (error) return console.error(error);
  console.log('Received %d messages', messages.length);

  // true  - (Acknowledge) Update Zk offsets and continue consuming
  // false - (Fail) Resend the same batch in 5 seconds so I don't
  //                have to put it somewhere. TODO: configure wait
  cb(true);
}

// Start consuming
// TODO: Support message filter function argument
zk.consumeTopic('MessageHeaders', 'dcrouse', onMessages);

// Stop consuming
// TODO: Implement

##Installation:

npm install kafka-zookeeper

##Checkout the code and run the tests:

git clone https://github.com/devoncrouse/node-kafka-zookeeper.git
cd node-kafka-zookeeper; make test-cov && open coverage.html

##Kafka Compatability matrix:

Versions taken from http://incubator.apache.org/kafka/downloads.html

0.0.15

11 years ago

0.0.14

11 years ago

0.0.13

11 years ago

0.0.12

11 years ago

0.0.11

11 years ago

0.0.10

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago