GitXplorerGitXplorer
z

ioredisMq

public
5 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
83a8a3b5478b4291c3ba5e90f10f1a340394d50a

update markdow version

committed 5 years ago
Unverified
e9f041ed1cbe752a555d600034a2e119b8cf8940

update markdow version

committed 5 years ago
Unverified
52bb21215185ab094aa5b807f8eb614d7377c70d

modify README

committed 5 years ago
Unverified
4a0f78390c529f87b48a29a0d73459ffd517810a

modify README

committed 5 years ago
Unverified
3b1ac046b433108e95045e58b55031117a61ab25

add diff version test

committed 5 years ago
Unverified
6ad8799afd48cad3298026a957aebb7ec5d4d80f

add test file

committed 5 years ago

README

The README file for this repository.

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