Bull: Changing the rate limit of an active queue

Created on 19 Apr 2019  路  6Comments  路  Source: OptimalBits/bull

Hi,

I'm trying to dynamically change the rate limiting of a running queue in order to react to a signal received from an external service. I can't find a way to do this in the docs.

Thanks for any help

enhancement

Most helpful comment

This is not possible at the moment. Not super high priority atm since it seems quite a niche feature but this can change if many people vote for this one.

All 6 comments

this is not possible at the moment.

Hello, I'm interested in the same feature. If the same queue is running on multiple machines is it currently possible to destroy the queue from one machine and re-create it with a different throttle parameter? Or does calling queue.close() only remove the single machine from the queue?

if you create a new instance with a different rate limit value that one will take over.

but do not mix different queue instances with different rate limit values or is it going to give some unpredictable results...

We're investigating the possibility of changing the rate limit of a running queue.

We found this GitHub issue and were wondering if there has been progress since last year. Does BullMQ address the problem of dynamically setting the rate limit, by any chance?

We tried replacing the in-memory instance of the queue with a new one that had a different rate limit, but that didn't appear to change the rate at which jobs were executed. Restarting the worker process with a new rate limit appeared to change the rate at which future enqueued jobs were executed, but not the existing ones.

We could not use rate limits at all and manually manage pulling jobs and executing them, but ideally it wouldn't come to that.

Any additional insight on how to implement dynamic rate limits would be much appreciated.

This is not possible at the moment. Not super high priority atm since it seems quite a niche feature but this can change if many people vote for this one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rodrigoords picture rodrigoords  路  4Comments

joe-at-startupmedia picture joe-at-startupmedia  路  3Comments

btd picture btd  路  3Comments

weeco picture weeco  路  3Comments

chocof picture chocof  路  3Comments