A MongoDB-backed job queue for Node.js, inspired by Resque. Version 1.0.0. The library ensures no jobs are lost even if the application crashes by keeping jobs in the database until workers complete them successfully. It supports job expiration, timeouts, max attempts, delayed execution, and parallel workers. Unlike many job queues, it emphasizes reliability over performance, making it suitable for critical tasks. The API includes Connection, Template, and Worker classes. The project appears inactive (last release in 2013).
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
The package is written in CoffeeScript and provides a default export. In Node.js, require('mongo-queue') returns the module, which contains Connection, Template, and Worker as properties. Use const mq = require('mongo-queue'); then new mq.Connection(). For ESM, there is no named export; use default import.
Template is a CoffeeScript class; extend it to define job perform() and complete() methods. The library uses CoffeeScript's class inheritance; if using JavaScript, you must call Template.call(this) in constructor or use ES6 class extension which works because CoffeeScript classes are compatible.
Worker constructor expects connection (instance of Connection), an array of Template subclasses, and an options object. Common mistake: passing job instances instead of classes.
Shows how to create a job template, connect to MongoDB, enqueue a job, and start a worker to process jobs.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.