A lightweight concurrency limiter and request queue for Node.js, version 1.0.7. It controls the number of concurrent requests to a processing module, buffering excess requests to prevent overload (e.g., handling user alarm clock requests at the hour). Key features: configurable concurrency, per-request acquire timeout, optional request deduplication via requestId, and promise-based API with fallback to callback. Unlike generic rate limiters, it focuses on queuing with timeout and deduplication.
npm install waiting-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a waiting queue with concurrency 2, adds 5 requests, logs results or errors.
Provide process function either globally or per-request, not both to avoid confusion.
Ensure requestId is unique per logical operation; avoid reusing IDs for simultaneous requests.
Set waitTimeout appropriately based on expected queue wait time; default is 5000ms.
No dependency data recorded yet.