service broker - What does SQL Server sys.dm_broker_activated_tasks tell me? -


i have server broker application inherited abends false negative.

i think using sys.dm_broker_activated_tasks incorrectly, , want validate understanding of view shows correct.

can assume view showing tasks being activated, , no activated, in process of completing?

the procedure have monitors completion of processing looking when there no entries in sys.dm_broker_activated_tasks queue.

this appears work (mostly), except @ end when processing in queue winding down.

the row in table seems disappears before final message in queue has completed.

and unfortunately, uses fire , forget anti-pattern, can't @ time more make polling monitor bit smarter.

that view doesn't apart from:

returns row each stored procedure activated service broker.

https://msdn.microsoft.com/en-us/library/ms175029.aspx

not sure if have looked @ code, think better usage of combine sys.dm_exec_sessions

select  at.spid ,db_name(at.database_id) [databasename] ,at.queue_id ,at.[procedure_name] ,s.[status] ,s.login_time     sys.dm_broker_activated_tasks @ inner join     sys.dm_exec_sessions s on     at.spid = s.session_id; 

another place troubleshoot service broker sys.transmission_queue. see every message sent there until there acknowledgement received.