$ recombobulate _
home / tips / set-up-background-job-processing-with-bullmq-using-claude
0

Set Up Background Job Processing with BullMQ Using Claude

bagwaa @bagwaa · Mar 26, 2026 · Workflows
set-up-background-job-processing-with-bullmq-using-claude

BullMQ is the go-to for Redis-backed job queues in Node.js, but setting up workers, retry logic, and job scheduling has a lot of boilerplate. Claude handles all of it.

Set up BullMQ with a job queue for sending emails. Include a
producer that adds jobs, a worker that processes them with retry
logic (3 attempts, exponential backoff), and a dashboard route
using bull-board. Use TypeScript.

Claude generates the full setup — queue definition, worker, and producer:

// queues/email.queue.ts
import { Queue, Worker } from 'bullmq';
import { connection } from './redis';

export const emailQueue = new Queue('email', { connection });

const worker = new Worker('email', async (job) => {
  await sendEmail(job.data.to, job.data.subject, job.data.body);
}, {
  connection,
  limiter: { max: 10, duration: 1000 },
  attempts: 3,
  backoff: { type: 'exponential', delay: 2000 },
});

Need more advanced patterns? Ask for them:

Add a scheduled job that runs every hour to clean up expired
sessions. Add a priority queue so password reset emails always
process before marketing emails. Include dead letter queue
handling for permanently failed jobs.

Claude also wires up the monitoring dashboard so you can inspect queued, active, and failed jobs in your browser.

Background jobs done right from the start — Claude scaffolds the queues, workers, and monitoring so you skip the trial-and-error setup.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 1 hour ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 1 hour ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago