1.0.5 • Published 3 years ago

@monvechen/kafka-easy v1.0.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

kafka-easy

About the Project

easy use for kafkajs

Usage

import { KafkaEasy } from './utils/KafkaEasy'

const kafka = new KafkaEasy({
  clientId: 'my-app',
  brokers: [
    "lzb-kafka.dibiaozuitu.com:9092"
  ],
  retry: {
    retries: 8
  }
}, 'topic')

#producer send msg
kafka.send([{ value: '1' }])

#consumer subscribe
kafka.subscribe((msg)=>{
  console.log(msg);
})
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago