问题
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