Configure immediate retries

Component: NServiceBus
NuGet Package NServiceBus (7-pre)
This page targets a pre-release version and is subject to change prior to the final release.
In order to get full control over Immediate Retries it is possible to override the default Recoverability Policy.
Immediate Retries cannot be used when transport transactions are disabled.

Configuring

var recoverability = endpointConfiguration.Recoverability();
recoverability.Immediate(
    immediate =>
    {
        immediate.NumberOfRetries(3);
    });

Disabling

var recoverability = endpointConfiguration.Recoverability();
recoverability.Immediate(
    immediate =>
    {
        immediate.NumberOfRetries(0);
    });
Configuration through app.config, IProvideConfiguration or ConfigurationSource is not available in Versions 6 and above.

Samples


Last modified