long-task-queue-reader is a JavaScript library for reading and processing tasks from a long-running task queue, designed to handle large volumes of tasks with backpressure and error handling. Version 0.8.2 is the current stable release, maintained regularly with a focus on robustness and performance. It differs from simple queue libraries by supporting persistent queue backends and providing a reader interface with configurable concurrency, retries, and task acknowledgment. Suitable for Node.js environments with async/await patterns.
npm install long-task-queue-readerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a reader from a Redis queue, processes tasks with acknowledgments, and handles errors.
Use reader.on('task', handler) instead of reader.on('onTask', handler).Implement manual reconnection logic or upgrade to a version with auto-reconnect.
Pass an options object to start().
Always call reader.acknowledge(task) after successful processing.
Provide a valid backend string (e.g., 'redis', 'sqs') in the options object.
Upgrade to v0.6.0+ or use the appropriate API for attaching handlers.
Wrap handler logic in try/catch and emit error event if needed.