Bee-Queue is a small Node.js library for creating, saving, and processing jobs in Redis, aimed at short real-time tasks and worker pools.
Overview
Bee-Queue implements a job and task queue for Node.js backed by Redis, emphasizing a compact codebase, throughput-oriented Redis usage, and atomic job handling. It targets workloads where a producer enqueues work, workers process it concurrently, and results can return within the same request cycle.
Queues are lightweight objects keyed by name; you create jobs with arbitrary JSON payloads, configure retries, backoff, delays, timeouts, and identifiers, then save them to Redis. Workers call process with a handler that supports callbacks or Promises, and many processes or servers can share one Redis instance to scale horizontally.
The library reports job progress and emits local, Pub/Sub, and per-job events for success, failure, retries, and stalls. Stalled jobs are detected when workers stop checking in and are re-enqueued for at-least-once delivery. Settings tune Redis connection sharing, event delivery, and worker behavior.
Redis 2.8 or newer is required, with documentation recommending Redis 3.2+ to avoid delayed-job issues. Arena provides a separate web UI for inspecting queues.
Key features
- Redis-backed job storage
- Concurrent worker processing
- Retries and backoff strategies
- Delayed and scheduled jobs
- Job progress Pub/Sub events
- Stalled job recovery
- Promise and callback handlers
- Bulk job save pipelining
Use cases
- Short HTTP-request background jobs
- Distributed Node.js worker pools
- Real-time task dispatch
- Cross-server job event tracking
- Redis-centered microservice queues