azureservicebus - Does Azure ServiceBus QueueClient.OnMessage execute on a different thread -


does queueclient.onmessage method execute callback parameter on different thread?

i assume if maxconcurrentcalls set 10 queueclient spin maximum of 10 threads process messages in parallel. new thread created if pass in maxconcurrentconnection value of 1 or execute on current thread?

my actual problem:
within worker role handle multiple queues have them process concurrently. e.g.

        _queueclient1.onmessage(x =>             {                 //             }, new onmessageoptions { maxconcurrentcalls = 1});          _queueclient2.onmessage(x =>         {             //         }, new onmessageoptions { maxconcurrentcalls = 1 });          _queueclient3.onmessage(x =>         {             //         }, new onmessageoptions { maxconcurrentcalls = 1 });          _queueclient4.onmessage(x =>         {             //         }, new onmessageoptions { maxconcurrentcalls = 1 }); 

would result in each callback being executed in parallel _queueclient4 callback isn't waiting _queueclient2 finish before can execute?

when register callback onmessage called on different thread. if set maxconcurrentcalls 10, create 10 threads 10 messages , callback of these each message concurrently. can across queues show above of course there no synchronization or ordering done between each individual callback processing.

when invoke callback on new thread, synchronous particular execution/message in until method completes or exception thrown, message processing not completed. if maxconcurrentcalls 0 single thread processed each of callback registered. when have different queueclient instances can register different callbacks them or same callback different concurrent counts etc.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -