Another point to point mq's implementation based ioredis。inspired by rsmp
npm install ioredisMq
const MQ = require("ioredisMq");
const mq = new MQ( {host: "127.0.0.1", port: 6379, ns: "rsmq"} );
const resp = await mq.createQueue({qname: 'test'})
const resp = await mq.sendMessage({qname: 'test', message: 'hello world'})
if (resp) {
console.log('sendMessage success')
}
const resp = await mq.receiveMessage({qname: 'test'})
if (resp) {
console.log(resp) // { id: 'fjpelmxa4ssQUxNw1Xv2plsvoCPOsrXv', message: 'hello world' }
}