开发者

NServiceBus IMessageModule per message

开发者 https://www.devze.com 2023-04-03 03:43 出处:网络
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

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

精彩评论

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

关注公众号