Bull is a Node library that implements a fast and robust queue system based on redis. It is the recommended successor to Automattic's deprecated Kue. The next version of Bull, currently in development, is BullMQ.
Questions tagged [bull]
100 questions
35
votes
1 answer
Jest tests leaking due to improper teardown
While doing testing with Jest I am getting a warning saying "A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find…

Sterlin V
- 666
- 2
- 7
- 12
7
votes
0 answers
NestJS Fastify Bull Board integration
I'm trying to integrate Bull Board in to NestJS + Fastify service.
bull-board.middleware.ts
import { Injectable, NestMiddleware } from '@nestjs/common';
import { router as bullBoardMiddleware } from 'bull-board';
@Injectable()
export class…

Bogdan Kolesnyk
- 71
- 3
4
votes
3 answers
Bull - Reached the max retries per request limit
I am using npm bull to add my queue job to handle about sending mail for my project. It runs no problems for a long time, but recently, it shows this error:
Error while handling task collect-metrics: Reached the max retries per request limit (which…

IT All
- 47
- 3
- 8
4
votes
1 answer
Bullmq get a job with a specific ID from a queue
I am trying to create a results queue on BullMQ where all workers can send results adding jobs with special crafted jobIDs. The idea is that all results arrive with a specific jobID generated so that I known exactly which process the result is…

Fabrizio Invernizzi
- 41
- 2
- 3
4
votes
1 answer
How to execute predefined number of jobs at one time in Nestjs bull
I have 65 same named jobs to execute in one queue with 3 instances of consumers (A, B, C). I want to do at one time each consumer execute 10 jobs. After the 10 execution completed, if there are available jobs greater than 10 in the queue that…

madushanka mdk
- 153
- 1
- 6
4
votes
2 answers
NestJS Bull Queues: How to skip processing in test env?
I'm using NestJS Queues via Bull and writing unit tests in Jest. I want to skip the processing of jobs triggered during testing.
There's a GH issue on test mode for Bull but they won't implement it.
Preferably I'd avoid extensive mocking, a simple…

thisismydesign
- 21,553
- 9
- 123
- 126
4
votes
3 answers
how to remove a delayed job from bull js?
I am new to Bull and my use case is to run a job after 10 sec, for that, I am using the below code
const options = {
delay: 10000, // in ms
jobId: myCustomUUID,
};
myQueue.add(someRandomData, options);
after adding it to the queue,…

s__k
- 41
- 1
- 7
4
votes
0 answers
Bullmq retry completed jobs manually
I'm using bullmq to send webhooks events. Jobs are scheduled and an automatic retry is in place. Let's say I want to re-execute some tasks which already successfully completed and I have the ids of the elements in the queue I want to reschedule, is…

Pjotr Raskolnikov
- 1,558
- 2
- 15
- 27
3
votes
1 answer
NestJS Bull queues - Missing lock for job failed
I'm using Bull with NestJS to handle a jobs queue. In the process handler I would like to mark a job as failed instead of completed, but it seems - also reading the documentation - that the Job#moveToFailed() method is allowed only on waiting…

andrea.rinaldi
- 1,167
- 1
- 13
- 33
3
votes
1 answer
The Angular Universal (SSR) cannot integrate with the external libraries like puppeteer, bulljs
This is just for describing the issue and sharing my solution, I got stuck a lot of time on it.
This issue happened after I upgraded the Angular 10 -> 11 and changed the builder from udk:udk-runner to @angular-devkit
The issue I was facing is when I…

Phat Tran
- 3,404
- 1
- 19
- 22
3
votes
1 answer
How to make a Redis (Bull) queue in a Node.js environment that's deployed to Heroku?
I've looked through all of the documentation, and I'm having some trouble finding examples of the correct implementation. First of all, I have the Heroku Redis add-on as you can see below:
https://i.stack.imgur.com/9kcXW.png
I installed Redis and…

nickcoding2
- 142
- 1
- 8
- 34
3
votes
0 answers
Bull Queue retries being pushed to tail, not head
Using Bull queue. I have a queue that is rate limited. I would like failed jobs to be retried as soon as possible in the queue, considering the rate limits and backoff strategy. This does not seem to be the case. It seems that the failed job is…

Evil Buck
- 1,068
- 7
- 20
2
votes
0 answers
NestJS, Bull Queue and Redis in production
I have a project using NestJS version 9.2.0 with Bull Queue version 4.9.0 which is connecting to Redis to schedule jobs.
Locally this is working as expected, however, when deploying to staging then Bull won't connect and it fails with error…

Gtchweb
- 49
- 1
- 8
2
votes
0 answers
BullMQ throwing "Missing lock for job failed" after using moveToDelayed
I'm following this pattern in the docs https://docs.bullmq.io/patterns/process-step-jobs
But it seems like the example code throws a Missing lock for job failed error. Following is a minimal reproducible version
import { Worker, Queue } from…

Sumit Ghosh
- 1,033
- 10
- 29
2
votes
1 answer
How do I know nestjs/bull is actually connected to redis?
I am using nestjs with bull queues. I am using @nestjs/bull package and everything works fine. But if for some reason, my application is not connected to redis, I don't get any error. The application runs properly, doesn't get any errors but doesn't…

Pranta
- 2,928
- 7
- 24
- 37