Table of Contents

Method ResetConsumerAsync

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

ResetConsumerAsync(string, string, ulong, CancellationToken)

Reset a consumer's delivery state.

ValueTask<ConsumerResetResponse> ResetConsumerAsync(string stream, string consumer, ulong seq = 0, CancellationToken cancellationToken = default)

Parameters

stream string

Stream name where consumer is associated to.

consumer string

Consumer name to be reset.

seq ulong

Stream sequence to reset to. Zero (the default) resets the consumer to its current ack floor.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

ValueTask<ConsumerResetResponse>

The reset response, including the consumer info and the sequence the consumer was reset to.

Remarks

This feature is only available on NATS server v2.14 and later.

Exceptions

NatsJSException

There was an issue retrieving the response.

NatsJSApiException

Server responded with an error.

ArgumentException

The stream name is invalid.

ArgumentNullException

The stream name is null.