@sensejs/kafkajs-standalone
v0.11.0
Published
This package provides easy to use kafka consumer and producer based on [kafkajs], without core parts of sense.js as dependencies.
Downloads
58
Readme
Standalone Wrapper for KafkaJS
This package provides easy to use kafka consumer and producer based on kafkajs, without core parts of sense.js as dependencies.
Install
npm install @sensejs/kafkajs-standalone kafkajs
Highlights:
Consumer:
Automatically set
partitionConsumedConcurrently
to number of partitions of a topic, to maximum the throughput.Detect rebalance as quickly as possible.
Save offset when consumer group is going to rebalance, to avoid any message be re-consumed as possible as it can (while still you should not expect it won't happen).
Producer:
Default
maxInFlightRequests
to1
andidempotent
totrue
, to fit requirements of transactional producer. Can be overridden if transaction is not required.Ability to provide
messageKeyProvider
to assign a key to message if not specified.