How to get the Queue name that NServiceBus pulled the message from.

Posted by Simon on Stack Overflow See other posts from Stack Overflow or by Simon
Published on 2010-05-25T01:45:35Z Indexed on 2010/05/25 1:51 UTC
Read the original article Hit count: 232

Filed under:

I can use this code to get the return address.

string returnAddress = Bus.CurrentMessageContext.ReturnAddress;

But how do i get the "to address" of the message. i.e. the Queue that NServiceBus pulled the message from.

I had a look through the source and it seems Bus.Transport.Address is what i want but there is no get on Transport

Note: I am within the "Handle" method of a message handler.

© Stack Overflow or respective owner

Related posts about nservicebus