0.0.1 • Published 9 years ago

kafka-stream v0.0.1

Weekly downloads
4
License
-
Repository
github
Last release
9 years ago

kafka-stream

Node 0.10 Stream compatible kafka consumer

WARNING: This is still experimental and should not be used in production.

Overview

This modules aims to provide a simple and stream compatible interface to Prozess' kafka Consumer. It hides the polling complexity of reading from a kafka stream.

Installation

npm install kafka-stream

Usage

var KafkaStream = require('kafka-stream');

var myStream = new KafkaStream({
  host: 'localhost',
  port: '9092',
  partition: 0,
  topic: 'test'
});

myStream.start(function(err) {
  if (err) {
    handleError(err);
    return;
  }
  myStream
    .pipe(es.parse())
    .pipe(stdout);
});

Development

Pull requests are welcome.

npm test