Simple Redis Queue for Node.js
Super simple wrapper for redis lpush
and brpop
commands for basic queue
processing and multiple queue support.
Usage
// Require the moduleRedisQueue = require"simple-redis-queue"; // Construct a queue with a redis connectionmyQueue = redisCon; // Publish to the queuemyQueuepush"queueName""body string or object"; // Listen for myQueueon"message"function queueNamepayload // Do something with the message; // Listen for errorsmyQueueon"error"function error consoleerrorerror;; // Start monitoring this queuemyQueuemonitor"queueName";