I want to get notification when emails moved to Dead Letter Queue from Queue in Azure Service Bus. How to do it with Function App or Shell Script or Power shell?
Example:
So lets say right now i have 5 items in dead letter queue, so maybe its something running every hour, if new item is added then it should trigger email notification.?
Thanks in Advance!!
I tried with Power shell and Shell Scripting getting errors
2
Answers
@RithwikBojja From Where you have created "ServiceBusTriggered"
If i create function App choosing powershell Platform i am able to do Service bus trigger in Azure Function.
If i create it using Powershell Run Time,Am i able to run this script you have shared.
When i create Function Apps using .Net, i am not able to see "Functions"
enter image description here
I create Service bus trigger in Azure Function (Created Using Powershell Run Time).
Then I use your code, But I am not able to see output as i expected.
enter image description here
Please help me to resolve this issue.
There is a trigger called Service bus trigger in Azure Function which will also work for Dead Lettered messages as below:
Here you just need to add
queuname/$DeadLetterQueue
in Service bus trigger:After Dead lettered the message:
the function gets triggered:
To send email you can use SendGrid/ SMTP .