TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published


VersionBuild StatusDependenciesCoverage Status

A Node.js client for Apache Kafka based on kafka-node. Event messages structures are defined using Protocol Buffers with message encoding/decoding being achieved using protobufjs.

With this module, it is possible to have a fine grained control over which Kafka topics and event names the client can subscribe to. There could be multiple event names associated for the same message. Internally message events are emitted to local listeners using Node.js Events, which decode protobuf messages and execute the intended listeners.

This client includes a Provider object, which packages events and distributes them to the respective listeners. Currently, the following event providers are implemented:

  • Kafka
  • Local (in-process events, designed for testing)

When subscribing to a given event name, options can be passed. Currently, the supported subscription options are:

  • startingOffset - value for the starting offset to process messages; default is -1 (latest offset);
  • queue - a boolean flag; if set to true, messages are queued and processed synchronously;
  • forceOffset - a boolean flag; if set to true, startingOffset is considered above any other provided offset or configuration parameter.



See tests. To execute the tests a set of backing services are needed. Refer to System repository to start the backing-services before running the tests.

  • To run tests
npm run test


  • Install dependencies
npm install
  • Build
# compile the code
npm run build


DownloadsWeekly Downloads






Unpacked Size

109 kB

Total Files


Last publish


  • vanthome
  • akumarnpm
  • dani723
  • vilsol
  • radu1990