在SQL Server 2008 R2中,我设置了Service Broker发送,出站和通知队列。出站队列已启用激活。
我希望在有害消息导致出站队列被禁用时捕获BROKER_QUEUE_DISABLED通知。然而,我无法捕获通知队列上的通知 - 可能出现什么问题?
CREATE QUEUE [dbo].[NotificationQueue]
CREATE SERVICE [dbo_NotificationService]
ON QUEUE [dbo].[NotificationQueue]
([http://schemas.microsoft.com/SQL/Notifications/PostEventNotification])
CREATE EVENT NOTIFICATION [cont_OutboundEvent]
ON QUEUE [cont].[OutboundQueue]
FOR BROKER_QUEUE_DISABLED
TO SERVICE 'dbo_NotificationService', 'current database'