WCF Reliable Messaging Retransmission Algorithm


When configuring WS-Reliable messaging, you would notice that even though number
of retries (MaxRetryCount) is configurable but the interval in which retries are
attempted is NOT configurable.  This is because WCF uses an exponential back-off
congestion control algorithm to calculate the retry timeout.  This algorithm is
internal to WCF and is NOT configurable.

The initial retry time is calculated based on the “session initiation
(Time difference between the CreateSequence and
CreateSequenceResponse). The algorithm doubles the retransmission delay with
every attempt until MaxRetryCount reached.

If you try to send large messages inside a reliable session you might see
additional retransmission fairly quickly. As the RM implementation calculates
its initial retransmission timeout based on the “session initiation time”
which remains quite small value (< 50ms ) in most cases. Now if the
second message is a large one – the retry timeout expires and message is
retransmitted.  This behaviour is by design as Reliable messaging is not
intended to be used for large messages – this is why it doesn’t support
streaming. If your goal is to send large messages and survive broken
connections, then you should look at ReliableSessions along with the

Original post by Zulfiqar Ahmed on October 13th 2010, here: http://zamd.net/2010/10/13/wcf-reliable-messaging-retransmission-algorithm/

Comments (0)

Skip to main content