Installation
Prerequisites
Section titled “Prerequisites”- Node.js 22.12 or newer
- MongoDB 4.4 or newer, compatible with the MongoDB Node.js driver 7.6
- Monque works with regular polling on standalone MongoDB
- Change Streams require a replica set or sharded cluster (MongoDB Atlas provides this by default)
Install the Package
Section titled “Install the Package”Peer Dependencies
Section titled “Peer Dependencies”Install the MongoDB Node.js driver (mongodb ^7.6.0) alongside Monque. Pass a database
from your existing client to share its connections. You choose the driver version within
that supported range.
Choose packages
Section titled “Choose packages”| Package | Use it for |
|---|---|
@monque/core | Register workers, enqueue jobs, schedule recurring work, and query MongoDB jobs. |
@monque/tsed | Integrate workers and scheduler lifecycle with a Ts.ED application. |
@monque/management | Expose job queries and actions through an HTTP contract. |
@monque/management-express | Serve the Management API from Express. |
@monque/dashboard-express | Serve the bundled dashboard from Express. Includes @monque/dashboard. |
@monque/dashboard | Access built dashboard assets and configuration types for custom server adapters. |
For an Express application with the dashboard:
Follow Dashboard setup for the server configuration. You do not need to install React or build the frontend in your application.
The MongoDB driver 7.6 no longer supports MongoDB 4.2 and earlier. See MongoDB’s driver upgrade notes when upgrading an existing deployment.
Start processing
Section titled “Start processing”Follow the Quick Start to register a worker and enqueue its first job, or use the Ts.ED integration in a Ts.ED application.