Configure immediate retries

Component: NServiceBus
NuGet Package NServiceBus (7.1-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

  • NumberOfRetries: Number of times Immediate Retries are performed. Default: 5.
7.x NServiceBus
var recoverability = endpointConfiguration.Recoverability();
recoverability.Immediate(
    immediate =>
    {
        immediate.NumberOfRetries(3);
    });

Disabling

7.x NServiceBus
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