A RabbitMQ queue worker library for Node.js, version 2.1.0. Simplifies setting up job queues with configurable concurrency (jobsCount), retry attempts (attemptsCount), and delayed retries (attemptDelays). Supports custom success, fail, and error event handlers. Requires RabbitMQ and the 'rabbit-queue' package with scheduledPublish flag enabled. Differentiated by built-in attempt delay management and TypeScript type definitions.
npm install queue-workerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a RabbitMQ queue worker with typed messages, failure handling, and retry delays.
Ensure RabbitMQ is running and install 'rabbit-queue' as a peer dependency: npm install rabbit-queue. Initialize Rabbit with { scheduledPublish: true }.Set attemptDelays to cover all attempts or ensure the last element is a catch-all delay.
Define the queue in RabbitMQ (e.g., via management UI or channel.assertQueue) before using queue-worker.
Always provide three type parameters: Message, Exception, and Result.
Run 'npm install queue-worker' and ensure import is 'import { QueueWorker } from 'queue-worker'Install rabbit-queue: 'npm install rabbit-queue'. Import as: 'import { Rabbit } from 'rabbit-queue'Install rabbit-queue: 'npm install rabbit-queue'