[rabbitmq-discuss] High CPU Usage

Alexis Richardson alexis.richardson at gmail.com
Thu Dec 31 00:00:40 GMT 2009


Bryan,

Re get vs consume:

http://www.google.co.uk/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=3Io&q=site%3Alists.rabbitmq.com+%22basic.get%22+%22basic.consume%22+rabbitmq&btnG=Search&meta=&aq=f&oq=

alexis



On Wed, Dec 30, 2009 at 11:58 PM, Alexis Richardson
<alexis.richardson at gmail.com> wrote:
> 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