[rabbitmq-discuss] High CPU Usage
Alexis Richardson
alexis.richardson at gmail.com
Wed Dec 30 23:58:15 GMT 2009
Weird.
In any case: Have you tried using basic.consume? While not directly
addressing your question, it may help.
alexis
On Wed, Dec 30, 2009 at 11:25 PM, Bryan Murphy <bmurphy1976 at gmail.com> wrote:
> I want to set up 3 queues, High, Medium, and Low where I always pull
> messages from the higher priority queues first. Right now, I more or less
> do the following:
>
> while (true)
> {
> result = null;
>
> foreach (var queue in queues)
> {
> result = model.BasicGet(queue, false);
>
> if (result != null)
> break;
> }
>
> if (result != null)
> DoSomething(result);
>
> Thread.Sleep(15); // 15ms
> }
>
> Functionally this achieves what I'm trying to accomplish, however, the CPU
> usage of the RabbitMQ server goes through the roof once I spin up a few
> listeners.
>
> Is there another way I can accomplish the same thing that doesn't hit the
> RabbitMQ server so hard?
>
> Thanks,
> Bryan
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
More information about the rabbitmq-discuss
mailing list