ESB + WCF 多个服务上的事务
我有一个带有代理的 ESB (Aqualogic)。
这个代理将调用 3 个不同的服务,我必须将这 3 个服务放在事务范围中...
ESB 不支持事务...
有人知道任何解决方案吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我有一个带有代理的 ESB (Aqualogic)。
这个代理将调用 3 个不同的服务,我必须将这 3 个服务放在事务范围中...
ESB 不支持事务...
有人知道任何解决方案吗?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
我对 Aqualogic 并不熟悉,但总的来说,我可以说你想做的事情非常非常困难。
如果 Aqualogic 使用 MSMQ 进行传输,那么您可以通过使用事务队列获得某种形式的事务支持。但这只是开始。
如果要将 WCF 服务与事务上下文集成,则需要设置对 WS-Atomic 协议的支持(请参阅 http://msdn.microsoft.com/en-us/library/ms729784.aspx 和 http://social.msdn.microsoft.com/Forums/en/wcf/thread/cae32545-6536-4631-b89f-54f55da62199)。这是屁股的严重疼痛。
不仅要配置它,还要使用它。跨服务器使用 WS-Atomic 意味着您需要在所有计算机上激活 MSDTC,并且这些 MSDTC 之间的协调非常慢并且容易出现长时间超时。
最好不要期望在单个事务中运行所有内容,而是使用可以补偿操作的部分成功/部分失败的工作流程。另请参阅 http://msdn.microsoft.com/en-us/library/dd483319 .aspx 为例。
I am not familiar with Aqualogic, but in general I can say that what you want to do is very, very difficult.
If Aqualogic uses MSMQ for transport then you may have some form of support for transactions by using transactional queues. But that's only the start.
If you want to integrate WCF services with a transactional context, you need to set up support for the WS-Atomic protocol (see http://msdn.microsoft.com/en-us/library/ms729784.aspx and http://social.msdn.microsoft.com/Forums/en/wcf/thread/cae32545-6536-4631-b89f-54f55da62199). This is a serious pain in the butt.
Not just to configure it, but also to use it. Using WS-Atomic across servers means you need to activate MSDTC on all machines, and coordination between these MSDTC's is very slow and prone to long timeouts.
It's a better bet to not expect to run everything in a single transaction, but to use a workflow that compensates for partial success/partial failure of your operation. See also http://msdn.microsoft.com/en-us/library/dd483319.aspx for an example.