{"repo":"openwar/mongodb-queue","free":true,"listed":false,"github":"https://github.com/openwar/mongodb-queue","clone":"git clone https://github.com/openwar/mongodb-queue.git","description":"Use your existing MongoDB as a local queue","language":"TypeScript","stars":13,"topics":["mongodb","queue","mongo","queues","nodejs","bun","fifo","message-queue","typescript"],"license":"MIT","category":"data-pipelines","readme_excerpt":"mongodb-queue [![NPM version][npm-image]][npm-url] [![JSR version][jsr-image]][jsr-url] ![Build Status][workflow-ci-url] [![TypeScript][typescript-image]][typescript-url] [![Bun][bun-image]][bun-url] [![license][license-image]][license-url] [![install size][size-image]][size-url] ![dependencies][deps-image] [![codecov][codecov-image]][codecov-url] A really light-weight way to create queues with a nice API if you're already using MongoDB. Features - Full TypeScript support with type definitions included - Atomic operations — messages are never lost or processed twice - Message deduplication with hashKey option - Delayed messages — schedule messages for future processing - Visibility timeout — automatic retry if processing fails - Tested with MongoDB 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0 - Works with mongodb driver 5.x, 6.x, and 7.x - Compatible with Node.js 20+ and Bun 1.2+ Getting started Install using your preferred package manager: Create a connection to your MongoDB database, and use it to create a queue object: TypeScript with typed payloads Add a message to a queue: Get a message from the queue: Ping a message to keep its visibility open for long-running tasks: Ack a message (and remove it from the queue): If you haven't already, you should call this to make sure indexes have been added in MongoDB. Of course, if you've called this once (in some kind one-off script) you don't need to call it in your program. Of course, check the changelog to see if you need to update them with","default_branch":null,"files":null,"tree":[],"storefront":"/r/openwar","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/openwar/mongodb-queue/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}