Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.25 KB

README.md

File metadata and controls

19 lines (13 loc) · 1.25 KB

status

Requirements

kafkacat binary needs to be available somewhere in your search path.

Quickly build using the bootsrap script: https://github.com/edenhill/kafkacat [1][2]

[1]: If you're using OSX, the librdkafka build fails when trying to build its examples. Some work arounds are suggested here.
[2]: Also, edenhill/kcat#3

Usage

node-kafkacat turns the kafkacat C library into node streams. There is one difference between the consume stream and a typical readable stream, and that is the .end method which just kills the kakfacat process.

Refer to the tests for usage examples: https://github.com/Rafflecopter/node-kafkacat/blob/master/tests/index.js

The mapping of option keys passed to the stream constructor to kafkacat command-line arguments is documented in code here. Any extra settings as documented in kafkacat can be passed as well. node-kafkacat will take care of formatting them as -X key=val when calling kafkacat.