node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org ¬Ľ

sinek


node-sinek

Greenkeeper badge

Build Status npm version

Node.js kafka client, consumer, producer polite out of the box

make it about them, not about you

  • Simon Sinek

Info

  • promise based api
  • core builds kafka-node module (checkout for options & tweaking)
  • native builds node-rdkafka module (checkout for options & tweaking)
  • uses ConsumerGroup(s) means your kafka needs to be > 0.9
  • check out :goberserk: node-kafka-streams for a stream processing kafka api
  • check out ūüĒ• node-kafka-connect for a easy datastore <-> kafka transfer

Offers

  • easy api
  • no worries backpressure service (dont fry your database)
  • auto-commit / manual drain commit in backpressure-mode (dont loose data)
  • a lot of pitfalls are automatically taken care of
  • provides a drain once for consumers (that reads a whole topic and fires an event)
  • provides easy partition spreading, keyed messages and json formats for producers
  • auto reconnect
  • SSL support
  • SASL support (through native clients)

Install

npm install --save sinek

Usage

const {
  Kafka,
  Drainer,
  Publisher,
  PartitionDrainer,
  Consumer,
  Producer,
  NConsumer,
  NProducer,
} = require("sinek");

We suggest using the native clients NConsumer & NProducer implementations, if possible.

Docs