kk-rocketmq

1.1.0 • Public • Published

kk-rocketmq

针对ali-ons的简单封装

使用方法

producer


let res = await new Producer({
    instanceName:'xxxx',
    producerGroup:'xxx',
    nameSrv: "xxx.xx.com", 
}).sendMessage("topic","tag","body")

consumer


let consumer = new Consumer({
    instanceName:'xxxx',
    consumerGroup:'xxx',
    nameSrv: "xxx.xx.com"
})

consumer.subscribe("topic","tag",async msg=>{
      console.log(`receive message, msgId: ${msg.msgId}, body: ${msg.body.toString()}`)
})

Readme

Keywords

none

Package Sidebar

Install

npm i kk-rocketmq

Weekly Downloads

6

Version

1.1.0

License

none

Unpacked Size

5.68 kB

Total Files

3

Last publish

Collaborators

  • com-melot-kk-web