How to rate-limit by parameter value #1990
-
I am trying to implement a queue which has, say, 5 workers. The workers are processing jobs for events generated by user accounts. I would like to make sure that no more than one job is processed for an account at a time. I can't make a separate queue for each account, because that would allow Any suggestions on how to do this efficiently? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
To answer my own question, Bull has a rate-limiting feature called Group Key which can be used to set a rate limit, in this case, for each account. |
Beta Was this translation helpful? Give feedback.
To answer my own question, Bull has a rate-limiting feature called Group Key which can be used to set a rate limit, in this case, for each account.