A minimal competing-consumers pattern queue built on Redis (about 100 lines of code). Version 1.1.1 runs on Node >=4.0. Uses BRPOP for reliable message delivery and supports multiple producers and consumers with at-least-once delivery guarantee. Lightweight alternative to Kue/Bull, but lacks persistence, retries, and scheduling.
npm install redis-ccp-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a producer that pushes messages to a Redis queue and a consumer that processes them. The consumer callback must call done() to acknowledge message handling.
Always invoke the callback's second argument (usually named done) after processing.
Wait for active callbacks to complete before calling stop().
Parse JSON string in consumer if objects were pushed.
Use only alphanumeric characters and underscores for queue keys.
N/A
Use destructuring: const { Producer } = require('redis-ccp-queue');Pass a function as second parameter, e.g., new Consumer('key', (data, done) => { ... })Always provide a string or object to push().
Start Redis or configure environment variables REDIS_HOST, REDIS_PORT.