redis-clustered-queue
v0.0.3
Published
Simple queue with Redis pub/sub channels
Downloads
4
Readme
Redis Clustered Queue
Implement a simple queue library with Redis
Example
Publisher:
import Queue from 'redis-clustered-queue';
let myQueue = new Queue('myNiceChannel');
const job = {
name: 'follow',
person1: 'User A',
person2: 'User B'
};
myQueue.submitTask(job);
Subscriber:
import Queue from 'redis-clustered-queue';
let myQueue = new Queue('myNiceChannel');
let i = 0;
myQueue.subscribe(function(job){
i++;
if(i == 3){
myQueue.unSubscribe();
}
console.log(job);
});
API
todo
Implements in different languages
- [x] Node.js
- [ ] PHP
- [ ] Python