itye1970
itye1970

Reputation: 1995

How can you set up an alert when a message arrives in the Dead letter Queue in Azure Servicebus

I want to create an alert in Azure when a message hits the dead letter queue in azure servicebus , I checked the monitoring and cant see an option for when a "NEW" message arrives in the queue. Also is there any way of viewing the DeadLetterQueues via Azure itself or via the Azure CLI and NOT using a 3rd Party application?

Upvotes: 4

Views: 2674

Answers (2)

Johan Gov
Johan Gov

Reputation: 1352

While you cannot create an alert when a message is dead lettered, you can create one that fires when you have messages in your Dead letter queue. You should then remove the message from the DLQ which will resolve the alert.

For anyone coming here interested in creating an alert when you have messages in your DLQ you can configure this on your Service Bus resource. Select Alerts and Alert rules in the Azure portal: Select Alert rules on your Service Bus resource

Then click Create and select Count of dead-lettered messages in a Queue/Topic as your signal. enter image description here

Upvotes: 4

Gaurav Mantri
Gaurav Mantri

Reputation: 136356

I want to create an alert in Azure when a message hits the dead letter queue in azure servicebus , I checked the monitoring and cant see an option for when a "NEW" message arrives in the queue.

Currently it is not possible to create an alert when a message is dead-lettered. What you can do is either make use of Azure Function with Service Bus Trigger or a Logic App which gets triggered when a message is dead-lettered. There you could take a custom action (like sending an email).

Also is there any way of viewing the DeadLetterQueues via Azure itself or via the Azure CLI and NOT using a 3rd Party application?

You can view deadletter messages in Azure Portal using Service Bus Explorer (currently in preview). Please see the screenshot below.

enter image description here

Upvotes: 2

Related Questions