Search code examples
servicebusazureservicebusbrokeredmessage

Service Bus for Windows Server: is EnqueuedTimeUtc on BrokeredMessage changed when auto-forwarding messages?


I'm currently doing some tests on Service Bus for Windows Server, and I'm using the EnqueuedTimeUtc property of the BrokeredMessage class for some performance tests (to calculate whether how much of the overhead is from Service Bus and how much of it is from my application code).

In the configuration of the topics and queues, I set up auto-forwarding to automatically forward messages from a subscription to a queue.

To correctly interpret the measurements, I have to know whether EnqueuedTimeUtc on a BrokeredMessage represents the time that the original message was sent, or if it represents the time that the messages was forwarded to the queue.

Which is it? The original enqueue time on the topic, or the second enqueue on the queue?


Solution

  • When asking the same question on the MSDN forums, I got the following answer from Dan Rosanova who works on the Service Bus team at Microsoft:

    It’s not the enqueue from the upstream queue / entity - it is the stamped time that the Service Bus server stored that message into the entity.