We have a WCF service hosted in IIS which has a netMsmqBinding
. Before the message is dispatched to our service, we would like to log the MSMQ Lookup ID. Where I can I find this information?
We get it in an IErrorHandler
because an MsmqPoisonMessageException
has a MessageLookupId property. We need to log it at the start of a request so we can correlate the exception with the message.
I thought an IDispatchMessageInspector
would be the right place for this, but I can't seem to find any property in the AfterReceiveRequest method that would give me the Lookup ID.