0.9.3 • Published 11 years ago

simple-redis-queue v0.9.3

Weekly downloads
10
License
-
Repository
github
Last release
11 years ago

Simple Redis Queue for Node.js

Super simple wrapper for redis lpush and brpop commands for basic queue processing, with automatic JSON encoding/decoding of payloads and multiple queue support.

Usage

// Require the module
RedisQueue = require("simple-redis-queue");

// Construct a queue with a redis connection
myQueue = new RedisQueue(redisCon);

// Publish to the queue
myQueue.publish("queueName", "body string or object");

// Listen for new messages
myQueue.on("message", function (queueName, payload) {
    // Do something with the message
});

// Listen for errors
myQueue.on("error", function (error) {
    console.error(error);
});

// Start monitoring this queue
myQueue.monitor("queueName");
0.9.3

11 years ago

0.9.2

11 years ago

0.9.1

11 years ago

0.9.0

11 years ago