A Fastify plugin that integrates BullMQ through file-based Queue and Worker creation. Version 1.3.0 is the latest stable release. It uses a glob pattern (bullPath) to automatically discover and register BullMQ queues and workers from the filesystem. TypeScript types are included. Key differentiators: automatic file-based discovery eliminates manual queue/worker registration; supports exporting queueConfig and workerConfig options alongside worker functions. This plugin is lightweight and designed specifically for Fastify applications needing job queues. It requires fastify >=3.24.1 and bullmq ^1.59.4 || ^5.0.0 as peer dependencies.
npm install fastify-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers fastify-queue with Redis connection and glob pattern, TypeScript augmentation for queue/worker access.
Ensure your TypeScript worker files are compiled to .js before runtime, or adjust bullPath to match .ts if using ts-node.
Check BullMQ v5 migration guide if upgrading from BullMQ 1.x.
Ensure each worker file exports a default async function to create a worker; otherwise, only a queue is registered.
Structure files as subdirectories inside the bull path, e.g., bull/user/*.worker.ts creates queue named 'user'.
Run npm install fastify-queue and ensure tsconfig.json includes node_modules types.
Declare module augmentation as shown in README: declare module 'fastify' { interface FastifyInstance { queues: {...}; workers: {...} } }Run npm install bullmq