How to make queue evenly distribute the work to workers ? #1008
geminigeek
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
This is a feature/bug in LavinMQ. All messages may end up in one consumer if it is fast enough to process all messages as they are delivered. It's designed this way for performance reasons. One could argue that you have unnecessary many workers and could scale down the number of consumers. However, this is not an expected behavior for most people so this is something we'll do something about. |
Beta Was this translation helpful? Give feedback.
1 reply
-
You probably want to lower the prefetch a lot for your workers, set it to 1 or 2. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi,
i have few workers/consumers for a queue , all have
qos
of 10 or 15, i can see the consumer which starts first always gets the jobs , if jobs are less, can anyone suggest how to evenly use the workers in this scenario.one idea is to make one queue per worker/consumer and a master queue with just one router consumer,
the router consumer starts with 30 qos, checks the count of pending jobs in all queues of workers and wherever the count is less add the job to that consumer queue, but it seems complex design, anyone got a solution for this issue
Beta Was this translation helpful? Give feedback.
All reactions