Simple job queue implementation using Mongoose and MongoDB. v1.0.14, stable, maintained fork of mongoose-jobqueue compatible with Mongoose v5+. Uses ES6 Promises, no external deps besides Mongoose, implements MongoDB indexes and .lean() for performance. Offers queue operations: add, checkout, ack, ping, cleanup. Slightly different from original: no lodash, ES6 spread, arrow functions, CosmoDB sort support.
npm install fast-mongoose-job-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MongoDB, creates a job queue instance, adds a job, then checks out and acknowledges a job.
Upgrade to >=1.0.0 and replace any usage of lodash methods (_.pluck, etc.) with native JavaScript.
Upgrade Mongoose to >=5.11.3.
Do not use 'new'; call the function directly: mongooseJobQueue(mongoose, queueName).
Ensure payloads are JSON-serializable. For Dates, use ISO strings.
Use require() or configure bundler to handle CommonJS modules.
Install the correct package: npm install fast-mongoose-job-queue. Then require('fast-mongoose-job-queue') or create an alias.Call the function without 'new': const queue = mongooseJobQueue(mongoose, 'queueName');
Ensure the same queue name string is passed to both mongooseJobQueue(mongoose, name) and when using queue operations.
Call mongoose.connect() (or ensure connection is open) before mongooseJobQueue().