The most advanced Kafka Client.
- easy promise based API
- a lot of Kafka pitfalls already taken care of
- backpressure and stream consume modes
- secure committing in backpressure (1:n, batch) mode
- plain Javascript implementation based on
kafka-node
and a super fast native implementation based onnode-rdkafka
- SSL, SASL & Kerberos support
- auto reconnects
- auto partition recognition and deterministic spreading for producers
- intelligent health-checks and analytic events for consumers and producers
- check out node-kafka-streams for a stream processing kafka api
- check out 🔥 node-kafka-connect for a easy datastore <-> kafka transfer
Can be found here
npm install --save sinek
You will have to manually install node-rdkafka
alongside sinek.
(This requires a Node.js version between 9 and 12 and will not work with Node.js >= 13, last tested with 12.16.1)
On Mac OS High Sierra / Mojave:
CPPFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib yarn add --frozen-lockfile [email protected]
Otherwise:
yarn add --frozen-lockfile [email protected]
(Please also note: Doing this with npm does not work, it will remove your deps, npm i -g yarn
)
const {
NConsumer,
NProducer
} = require("sinek");
const {
JSConsumer,
JSProducer
} = require("sinek");
const {
Consumer,
Producer
} = require("sinek");
- Best-practice example
- SSL example
- SASL+SSL example
- Alpine based docker example
- Debian based docker example
make it about them, not about you
- Simon Sinek