How do I create an alert in SQL Agent, to notify me once service broker message queue exceeds 300 messages? I am trying to get a notification to an operator in SQL Agent when this occurs.

1 Answer 1


based on the documentation here


you should use an alarm like this:

USE [msdb]
EXEC msdb.dbo.sp_add_alert @name=N'MyAlert', 
        @performance_condition=N'Broker Statistics|Forwarded Pending Msg Count||>|300', 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.