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:<br><br>while (true)<br>{<br> result = null;<br><br> foreach (var queue in queues)<br>
{<br> result = model.BasicGet(queue, false);<br><br> if (result != null)<br> break;<br> }<br><br> if (result != null)<br> DoSomething(result);<br><br> Thread.Sleep(15); // 15ms<br>}<br><br>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.<br>
<br>Is there another way I can accomplish the same thing that doesn't hit the RabbitMQ server so hard?<br><br>Thanks,<br>Bryan<br>