Kue is a Redis-backed job queue library for Node.js that provides a complete system for defining, scheduling, and processing background work. It stores job metadata and state in Redis lists and sorted sets, enabling persistent, in-memory operations with configurable concurrency control and priority-sorted processing. The library includes a RESTful HTTP API for managing jobs and a web-based monitoring dashboard for inspecting job status, progress, and logs.
The system distinguishes itself through its event-driven worker model, where workers listen for job events via Redis pub/sub and process jobs asynchronously using callbacks. It supports delayed job scheduling with automatic promotion to the active queue, priority-based execution ordering, and fault-tolerant processing with configurable retries, timeouts, and recovery of stuck jobs after crashes. Graceful shutdown protocols allow workers to finish current jobs within a configurable timeout, while pause and resume controls provide administrative flexibility.
Kue offers job lifecycle monitoring through event listening for enqueue, start, completion, and failure events, along with per-job progress tracking and logging. The web dashboard provides real-time visibility into queue state, and search indexing enables querying jobs by their data content through REST endpoints. The system includes job cleanup for automatic removal of completed work, stuck job recovery on startup, and support for distributing processing across multiple CPU cores using Node.js Cluster. Security measures protect the web interface and API with TLS and HTTP basic authentication.