Configure immediate retries

Component: NServiceBus
NuGet Package: NServiceBus (8-pre)
This page targets a pre-release version. Pre-releases are subject to change and samples are not guaranteed to be fully functional.
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

  • NumberOfRetries: Number of times Immediate Retries are performed. Default: 5.
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