Table of Contents

Property RetryAttempts

Namespace
NATS.Client.JetStream
Assembly
NATS.Client.JetStream.dll

RetryAttempts

Specifies the number of retry attempts to publish a message when a "NoResponders" error occurs. The value defines how many additional attempts will be made after the initial publish attempt. Default is not to retry (one attempt total).

public int RetryAttempts { get; init; }

Property Value

int

Remarks

By default, this is set to 1, meaning that if the first publish attempt fails with a "NoResponders" error, no more attempts will be made. Setting this to a higher value allows for more retries in case of transient issues. Coupled with RetryWaitBetweenAttempts, this provides a mechanism to handle temporary unavailability of responders, however, for more robust handling of such scenarios, consider implementing an exponential backoff strategy in your application logic, or use an extension that supports it.