@zvs001/kafka-helpers
v0.0.1
Published
Provides manual commit implementation for kafkajs.
Downloads
3
Readme
Provides manual commit implementation for kafkajs.
Install
yarn add @zvs001/kafka-helpers
or
npm i -S @zvs001/kafka-helpers
Usage
Code example:
import { setupConsumer } from '@zvs001/kafka-helpers'
const consumer = kafka.consumer({
groupId: `group`,
})
await setupConsumer(consumer, {
eachMessage(message: { topic: string; partition: number; data: any }) {
const { topic, data } = message
// ...
},
})