I have to construct NHibernate Session from multiple SessionFactory based on a property inside Message, I think I could use IMessageModule to handle the begin of message processing but it doesn't have any argument and I don't know if it's possible to access current message being handled.
1
votes
1 Answers
1
votes
You can access the headers using the static Bus.CurrentMessageContext.Headers property
More here:
https://github.com/NServiceBus/NServiceBus/blob/v2.5/Samples/FullDuplex/MyClient/ClientEndpoint.cs