Method ResetConsumerAsync
ResetConsumerAsync(string, ulong, CancellationToken)
Reset a consumer's delivery state on this stream.
public ValueTask<ConsumerResetResponse> ResetConsumerAsync(string consumer, ulong seq = 0, CancellationToken cancellationToken = default)
Parameters
consumerstringConsumer name to be reset.
sequlongStream sequence to reset to. Zero (the default) resets the consumer to its current ack floor.
cancellationTokenCancellationTokenA 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 is an error retrieving the response or this stream object isn't valid anymore because it was deleted earlier.
- NatsJSApiException
Server responded with an error.