开发者

NServiceBus IMessageModule per message

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 o开发者_运维问答f message processing but it doesn't have any argument and I don't know if it's possible to access current message being handled.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜