ioredismq

1.0.3 • Public • Published

Build Status

ioredisMq

Another point to point mq's implementation based ioredis。inspired by rsmp

Install

npm install ioredisMq

Usage

const MQ = require("ioredisMq");
const mq = new MQ( {host: "127.0.0.1", port: 6379, ns: "rsmq"} );

createQueue

const resp = await mq.createQueue({qname: 'test'})

sendMessage

const resp = await mq.sendMessage({qname: 'test', message: 'hello world'})
if (resp) {
    console.log('sendMessage success')
}

receiveMessage

const resp = await mq.receiveMessage({qname: 'test'})
if (resp) {
    console.log(resp)   // { id: 'fjpelmxa4ssQUxNw1Xv2plsvoCPOsrXv', message: 'hello world' }
}

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i ioredismq

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

7.66 kB

Total Files

4

Last publish

Collaborators

  • zhangwenning