Azure Service Bus Dead Letter Queue: How to Retrieve and Read Messages
Hi friends 👋🏻😀, I am back with the new content , Let’s explore today how we can retreive , read and store DLQ message of service Bus queue.
The purpose of the dead-letter queue is to hold messages that can’t be delivered to any receiver, or messages that couldn’t be processed. We can inspect these DLQ messages , can store those to do the correction and resubmit as well.
Prerequisite
- Azure Portal subscription
- Create Logic App
- Create a Service Bus queue
- Create a storage account
Process
Step 1 : Create a first workflow that will send messages to service bus queue.

Step 2 : Create second workflow which will receive the message from the service bus queue and will send to dead-letter queue on failure.

- I have given here one same workflow url in the HTTP action.

- So, in the condition if the HTTP action is success then it will simply complete the message queue. Otherwise it will go to the dead letter queue action.



- Finally we are storing here the DLQ message in the storage account container as a backup :

Testing
Success Senario :
As a Input sending one Sample XML data in the First Workflow.

As an Output we will get :
In second logic app, HTTP action is successful.True block is executed and message is deleted from queue.

Failure scenario
To generate a failed scenario, I have given here wrong URL in the HTTP action. Hence, False block is executed and message has gone to dead-letter queue.

Dead-Letter queue Checking

Storage account Checking

Thanks for stopping by! Your visit means a lot. Please Follow me😊 Stay tuned for more content. Exciting stuff coming your way soon! 🚀 #StayTuned. Also, visit on RiovTech.
Post Comment
You must be logged in to post a comment.