Dequeue multiple message from Azure Queue

 

Let’s see how we can Dequeue multiple message from Azure Queue.

Create a mule service which will poll the Azurequeue every 10 seconds and print the messages in Logger.

For testing we can push messages to Azure Queue

Dequeue multiple message from Azure Queue

 

In Mule flow set Polling frequency and add logger activity in it – which simply print – Dequeue Started

Dequeue multiple message from Azure Queue

 

In first transformation we will set the payload for Azure Storage

 

here we want to Dequeue 2 message at a time from queue – myqueue

Please note – after 2 messages all other messages will be discarded in one poll

 

Azure Storage configuration –

 

Payload we receive from Azure Storage will be of List <CloudQueueMessage> Object so we must add transformation to get the required details

 

Once we transform the payload to JSON we again Log the Dequeue message

 

Once we run the mule flow then we can see the polled message from Azure queue

Dequeue multiple message from Azure Queue

 

and same messages are no longer available in Azure Queue

Dequeue multiple message from Azure Queue

 

4 messages are Dequeue from the Azure queue but in Log message we can only see first 2 messages as other 2 messages are discarded.

 
Also please see

Azure Storage Container Tutorials

Azure Storage Exchange

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Raml Setpayload
Raml Setpayload
2 years ago

Could you please tell me the class used in first transform message. It is not visible completely.

Thanks

Raml Setpayload
Raml Setpayload
2 years ago

Could you please tell me the class name used in transform message