Worker with rate limits and unique group processing #3035
Unanswered
r37r0m0d3l
asked this question in
Q&A
Replies: 1 comment
-
Yeah, this is not going to work well with standard BullMQ, you will need the groups support of the Pro version which also supports having different rate-limits per group: https://docs.bullmq.io/bullmq-pro/groups/local-group-concurrency |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m working with BullMQ (v5+) and need to implement a worker to process messages for different chats, with the following requirements:
Rate Limit:
Behavior:
The code below consumes an INCREDIBLE amount of memory (0.5 gb+). I can only have one copy of the application and trying to find a way to optimize the part with JS Maps multiple queues and workers. Seems like there should be another simpler way to implement a chat queue. Since
limiter.groupKey
is deprecated, it is quite difficult to figure out how to achieve the desired optimization.Beta Was this translation helpful? Give feedback.
All reactions