[rabbitmq-discuss] Slow throughput on consume side using java client API
Matthew Sackman
matthew at lshift.net
Thu Nov 26 10:10:33 GMT 2009
Hi Scott,
I must admit I'm a little confused by your description as it would
appear somewhat complex to me. However, am I correct in the following?
1. You have 1 queue, which is being published to by 50 threads.
2. You have 25 consumers on that queue.
3. To receive, you randomly select a consumer, and get that consumer to
consume a message.
If that's correct, I'm not surprised by your findings. Consumers on a
queue are round-robin'd by the broker. Thus each of your 25 consumers
will receive one 25th of the messages. Thus if you randomly select a
consumer then it may well have nothing waiting on it as messages have
been sent to the other consumers. Thus you will have to wait for up to
25 publishes before that consumer gets a message.
Why are you using so many threads and consumers?
Also, please let me know if I misunderstood anything about your setup.
Best wishes,
Matthew
More information about the rabbitmq-discuss
mailing list