The best way Azure Architect works to process data from ~ 10 queues

I have one worker role that throws data into 10 queues that need to be processed. There is a lot of data - perhaps around 10-100 messages per second that are queued in different queues.

Queues store different data and process it separately. In particular, there is one queue that is very active.

Now I have a setting, I have a separate working role that spawns 10 different threads, each thread executes a method that takes some time (true) {receive a message from the queue and process it}. Whenever data in a queue is returned, we simply run more of these processes to speed up the processing of data from the queue. In addition, since one queue is more active, I actually run several threads pointing to the same method to process data from this queue.

However, I see high CPU utilization during deployment. Almost constantly or almost 100%.

I wonder is it because of hunger? Or because the access to the queue is RESTful, and the threads end up blocking each other, connecting and slowing down? Or because I use:

while(true)
{
   var message = get message from queue;
   if(message != null)
   {
       //process message
   }
}

And is this running too fast?

Azure - , .

, . , : , , + , ? (, , while (true), , , ).

, Thread() - .

+3
5

... , , , . , . , .

:

while(true) { var msg = q1.GetMessage(); if (msg != null) { ... } msg = q2.GetMessage(); if (msg != null) { ... } }

, ( ). , (, CPU), .

+9

. Azure Queues.

( - Lokad.CQRS Azure), , , , . - .

, ( CPU), , .

+2

, . - sleep(). 100% ( ).

+1

MSDN,

MSDN - Windows Azure

, , , , mutliple , CPU 100% CPU.

+1

Source: https://habr.com/ru/post/1772792/