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
In Mule flow set Polling frequency and add logger activity in it – which simply print – Dequeue Started
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
and same messages are no longer available in 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
Could you please tell me the class used in first transform message. It is not visible completely.
Thanks
Could you please tell me the class name used in transform message