hm-nodejs-queue

Implement background job queues with BullMQ, Redis workers, retries, and monitoring.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/ArkhiMuttaqina/publisher-for-campuss --skill hm-nodejs-queue-arkhimuttaqina
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hm-nodejs-queue
Source: https://github.com/ArkhiMuttaqina/publisher-for-campuss/tree/main/skills/hm-nodejs-queue
Command: npx skills add https://github.com/ArkhiMuttaqina/publisher-for-campuss --skill hm-nodejs-queue-arkhimuttaqina

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bullmq, ioredis, @bull-board/fastify, @bull-board/api.

What problem does it solve? Slow operations like sending emails, generating reports, or calling external APIs block HTTP responses and degrade API performance. This Skill provides a complete pattern for offloading that work to Redis-backed background job queues with BullMQ, so workers process jobs asynchronously without slowing down the HTTP layer. ## Core Features & Use Cases - Queue and Worker Setup: Define typed queues and workers with a shared Redis connection, concurrency control, and exhaustive job-name handling in TypeScript. - Retries, Delays, and Scheduling: Configure exponential backoff retries, delayed jobs, and cron-based recurring jobs with duplicate prevention on restart. - Monitoring and Graceful Shutdown: Inspect queues with Bull Board and drain workers safely on SIGTERM to prevent job corruption. - Use Case: After a customer places an order, dispatch an "order-confirmation" email job from the order service, let a worker send it asynchronously with up to 3 retries, and monitor its status in Bull Board. ## Quick Start Ask the AI to set up a BullMQ email queue with a typed worker, exponential backoff retries, and Bull Board monitoring in your Node.js project.

Frequently Asked Questions about hm-nodejs-queue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a background job queue in Node.js with BullMQ?▼

Install bullmq and ioredis, create a Queue instance with a shared Redis connection, and define a Worker with a processor function. Dispatch jobs from services with queue.add() and let workers process them asynchronously with configurable concurrency.

How to schedule recurring cron jobs with BullMQ?▼

Use the repeat option with a cron expression when adding a job, such as repeat: { cron: "0 9 * * MON" }. On startup, remove existing repeatable jobs with removeRepeatableByKey before re-adding to prevent duplicates after restarts.

Why does BullMQ require maxRetriesPerRequest null in ioredis?▼

BullMQ uses blocking Redis commands that can exceed the default retry limit, causing ioredis to throw errors. Setting maxRetriesPerRequest to null and enableReadyCheck to false on the shared connection is required for BullMQ to function correctly.

Should BullMQ workers run in the same process as the HTTP server?▼

Same-process workers are acceptable for small apps, but a separate worker process is preferred in production. It scales independently of the HTTP layer and prevents a worker crash from bringing down the API.

How do I retry failed BullMQ jobs with exponential backoff?▼

Set attempts and backoff in defaultJobOptions at the queue level, for example attempts: 3 with exponential backoff starting at 1000ms. When a worker throws, BullMQ automatically reschedules the job until attempts are exhausted, then marks it failed.

How do I monitor BullMQ queues and failed jobs?▼

Use Bull Board with the @bull-board/fastify adapter to expose a web UI at a route like /admin/queues for inspecting and retrying jobs. In production, protect the route with authentication and admin authorization middleware.