ReliableSessionBindingElement.MaxRetryCount Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the maximum number of times that a message attempts to be transferred during the reliable session.
public:
property int MaxRetryCount { int get(); void set(int value); };
public int MaxRetryCount { get; set; }
member this.MaxRetryCount : int with get, set
Public Property MaxRetryCount As Integer
Property Value
The maximum number of times that a message attempts to be re-sent. The minimum value is 1; the maximum is Int32.MaxValue; and the default value is 8.
Exceptions
The value set is less than or equal to zero.
Remarks
A message is considered to be transferred if its delivery at the recipient has been acknowledged by the recipient.
If an acknowledgment has not been received within a certain amount of time for a message that has been transmitted, the infrastructure automatically retransmits the message. The infrastructure tries to send the message for, at most, a MaxRetryCount number of times. Not receiving an acknowledgment before this limit is reached is considered a fatal communication failure and causes the channel faulted event to be raised.
The infrastructure uses an exponential back-off algorithm to determine when to retransmit, based on a computed average round-trip time. The initial retry time is computed based on the measured roundtrip time of establishing the session. The retransmission algorithm doubles the delay with every attempt, which results in approximately 8.5 minutes passing between the first transmission attempt and the last retransmission attempt. The time for the first retransmission attempt is adjusted according to the calculated round-trip time and the resulting stretch of time that those attempts take varies accordingly. This allows the retransmission time to dynamically adapt to varying network conditions.