RSMQ Worker (v0.5.2) is a helper library for building workers on top of Redis Simple Message Queue (RSMQ). It provides event-driven message processing with configurable polling intervals, retry delays, and timeout handling. Last updated in 2016, it has few releases and is in maintenance mode. Key differentiators: simple API, event-based (message/error/timeout/exceeded), and built-in exponential backoff. It requires RSMQ 3+ and a Redis server 2.6+.
npm install rsmq-workerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an RSMQWorker with a custom Redis host/port, sets processing timeout, and attaches event listeners for message, error, exceeded, and timeout.
Update RSMQ to >=3.0.0 and Redis to >=2.6.
Consider migrating to alternatives like Bull or Bee-Queue for newer Redis features.
Always call next() after processing, even on error, to allow the message to be either deleted or retried.
Set a reasonable timeout (e.g., 5000) or handle the 'timeout' event to catch and process stalled messages.
Provide an array with multiple values or use the default [0,1,5,10] for standard backoff behavior.
Use const worker = new RSMQWorker('queue', options); and ensure you require('rsmq-worker') correctly.Connect to a single Redis instance or use a library that supports cluster (e.g., ioredis with custom rsmq instance).
Pass a redis client with auth: const redis = require('redis').createClient({password: 'secret'}); then pass to options.redis.Increase Redis maxmemory or reduce queue size by shortening message retention.