Wcf - 3 retries before exception?

余生颓废 提交于 2020-01-10 20:12:08

问题


I was asked to build a mechanism for 3 retries before generating a request exception.

We have this topology :

Service1 calls Service2.

If 3 times in a row has failed - generate an excpetion.

Is there any retry mechanism in WCF ?


回答1:


The WCF technology addressing this is Reliable Messaging. I think MaxRetryCount is the attribute you are looking for.

Here is an example with a custom binding using MaxRetryCount.



来源:https://stackoverflow.com/questions/13195959/wcf-3-retries-before-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!