A crash-friendly queue for Node.js that persists queue state to disk and can safely restart after a crash. Uses a worker pool with configurable concurrency. Version 5.0.4 is the latest stable release; maintenance is infrequent. Key differentiators: zero external dependencies beyond core Node modules (LevelDB fork removed after v4), simple stream-based API, and automatic persistence of queue state. Compared to alternatives like Bull or Kue, it is minimal, with no Redis dependency. Primarily used in server-side applications requiring durable job processing without a dedicated message broker.
npm install atomic-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a queue with a worker function, write jobs, handle events, and end the queue.
No action needed unless you relied on LevelDB-specific features. Persisted state is now a JSON file at process.cwd()/queue-state.json.
Replace 'new queue(worker, opts)' with 'queue(worker, opts)'.
Ensure your worker invokes done(null) on success or done(err) on failure.
Use queue-level events like 'idle' and 'finish' instead.
Remove 'new' and call queue(worker, opts) directly.
Update to v5 and remove any explicit LevelDB dependency.
Use default import: import queue from 'atomic-queue' or const queue = require('atomic-queue')