Wcf - 异常前 3 次重试? [英] Wcf - 3 retries before exception?
本文介绍了Wcf - 异常前 3 次重试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我被要求在生成请求异常之前构建 3 次重试的机制.
I was asked to build a mechanism for 3 retries before generating a request exception.
我们有这个拓扑:
Service1
调用 Service2
.
如果连续 3 次失败 - 生成异常.
If 3 times in a row has failed - generate an excpetion.
WCF
中是否有重试机制?
推荐答案
解决此问题的 WCF 技术是可靠消息传递.我认为 MaxRetryCount 是您正在寻找的属性.
The WCF technology addressing this is Reliable Messaging. I think MaxRetryCount is the attribute you are looking for.
此处是使用 MaxRetryCount 的自定义绑定示例.
Here is an example with a custom binding using MaxRetryCount.
这篇关于Wcf - 异常前 3 次重试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文