Friday, March 23, 2012

How to determine date/time message was placed onto Queue?

I need to determine the actual date/time that a message was placed on the queue. In my "activated" procedure I want to log this information and pass it along to further processing routines. From what I can tell, the Queue table itself does not have this information captured.

Which time are you after. The time it was put on the initiator queue or the target queue?

You can add the time to the message when you send it.

|||

Ideally, both.

I was looking for something out-of-the-box... not something where I craft my own message. The messages I will be receiving are based on a pre-defined schema and I did not want to go back to the design table with adding new elements. You would think that the "queue" table would have an additional column for "created date/time" basically.

If anything else, I think that should be a consideration for a future enhancement in the next version of Broker.

|||

Please add a suggestion on connect.microsoft.com/sqlserver/feedback.

Make usre you say exactly which date you are after.

|||There would be a performance penalty for storing SENT and ENQUEUED times into the target queue for each message even if the user was not really interested in those statistics. Our current model is that any user-specific data (sent-timestamp, order-number, request-id, message-id, sender-user-name, etc) would be encapsulated into the message_body itself.

No comments:

Post a Comment