Skip to content

Instantly share code, notes, and snippets.

@jdaigle
Created January 6, 2011 13:23
Show Gist options
  • Save jdaigle/767876 to your computer and use it in GitHub Desktop.
Save jdaigle/767876 to your computer and use it in GitHub Desktop.
get information from a service broker queue for monitoring purposes
SELECT
COUNT([QUEUENAME].[conversation_handle])
FROM [QUEUENAME]
INNER JOIN sys.service_message_types
ON [QUEUENAME].[message_type_id] = sys.service_message_types.[message_type_id]
INNER JOIN sys.conversation_endpoints
ON [QUEUENAME].[conversation_handle] = sys.conversation_endpoints.[conversation_handle]
WHERE sys.service_message_types.name = 'NServiceBusTransportMessage'
AND sys.conversation_endpoints.security_timestamp > @minDate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment