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.
我们有这样的拓扑结构:
We have this topology :
服务1
要求服务2
。
如果在连续3次失败 - 生成excpetion
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屋!
查看全文