A lightweight message queue implementation built on MongoDB, forked from mongodb-queue@4 to add support for MongoDB Node.js Driver v4, v5, v6, and v7. Version 5.5.0 is stable and feature-complete. Key differentiators: zero external dependencies beyond MongoDB driver, simple callback-based API, message visibility timeout and delay configuration, built-in indexing and cleanup. Compared to alternatives like Bull or Bee-Queue, it leverages existing MongoDB infrastructure without additional services.
npm install mongodb-queue-upNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a MongoDB-backed queue, adds a message, retrieves it, and acknowledges it using async/await.
Set a higher visibility option when creating the queue: mongoDbQueue(db, 'queue', { visibility: 60 })Use await queue.add(...) instead of queue.add(..., callback).
Use mongodb-queue@4 for MongoDB v3 driver, mongodb-queue@3 for v2 driver.
Use alphanumeric queue names only.
Call queue.clean() periodically or after processing.
Use correct import: import mongoDbQueue from 'mongodb-queue-up' in ESM, or const mongoDbQueue = require('mongodb-queue-up') in CommonJS.Ensure each message is acked only once. Use queue.ack(msg.ack) and handle errors.
Check if msg is not null/undefined: if (msg) { console.log(msg.id); }