Firelease is a Firebase queue consumer for Node.js with at-least-once and at-most-once semantics, fine-grained concurrency controls, and support for promises and generators (co). Version 3.2.1 is current, actively maintained. Built on top of Nodefire, it offers adjustable lease durations, automatic lease delay for balanced distribution, and preprocessing hooks. It targets Node >=10.0 and is designed for reliable task processing in distributed systems.
npm install fireleaseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Firebase queue worker with concurrency and lease options, processing tasks with async/await and returning RETRY or undefined.
Access the Firebase ref via task.$ref for any database operations.
Set minLease to a value that covers the worst-case task processing time.
Use RETRY only for immediate retries; for delayed retries, return a number of milliseconds or an epoch timestamp.
Install the 'co' package and set global.Promise.co = require('co'); before using generator workers.npm install nodefire
Use task.$ref.remove() instead of task.$ref().remove()
Ensure worker returns RETRY, undefined, null, a number (ms delay), or an epoch timestamp.