During the Delivery and Notification of User- and SignalMesssage's it could happen that the message is not correctly delivered or notified by the first attempt. Delivery or notification can fail for several reasons, for instance a network timeout.
To provide a more reliable deliver and notification system, AS4.NET supports retrying when delivery or notification fails. The retry deliver and notification functionality of the AS4.NET component is configured in the Sending Processing Mode and Receiving Processing Mode.
Processing Mode Configuration
A <Reliability/>
element must have the following values configured in this structure:
<Reliability>
<IsEnabled>true</IsEnabled>
<RetryCount>3</RetryCount>
<RetryInterval>00:00:05</RetryInterval>
</Reliability>
- The
IsEnabled
flag manipulates whether or not the operation should be retried on failure - The
RetryCount
will be the MaxRetryCount value used to determine how many retries could happen - The
RetryInterval
will be the interval in which retries happen
For the Sending Processing Mode:
- The
<ReceiptHandling/>
tag can have aReliability
element - The
<ErrorHandling/>
tag can have aReliability
element - The
<ExceptionHandling/>
tag can have aReliability
element
For the Receiving Processing Mode:
- The
<Deliver/>
tag can have aReliability
element - The
<ExceptionHandling/>
tag can have a<Reliability/>
element
That's all you need to do to enable the retry-functionality during the delivery or notification process.
Note that on certain failures, the retry will NOT happen even when it's configured this way. This could happen when the failure that occured is considered FATAL (for example: a 401 HTTP response code which means that there's a problem with permissions). The reason for this is that even when an retry is configured, the message will still fail the second time arround, therefore no retry will happen.
Note: Retryable deliver/notification is only available in version AS4.NET v.3.1.0 and beyond.