@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.
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 kafkajsHighlights:
Consumer:
Automatically set
partitionConsumedConcurrentlyto 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
maxInFlightRequeststo1andidempotenttotrue, to fit requirements of transactional producer. Can be overridden if transaction is not required.Ability to provide
messageKeyProviderto assign a key to message if not specified.
