Table of Contents

Method PauseConsumerAsync

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

PauseConsumerAsync(string, string, DateTimeOffset, CancellationToken)

Pause a consumer.

public ValueTask<ConsumerPauseResponse> PauseConsumerAsync(string stream, string consumer, DateTimeOffset pauseUntil, CancellationToken cancellationToken = default)

Parameters

stream string

Stream name where consumer is associated to.

consumer string

Consumer name to be paused.

pauseUntil DateTimeOffset

Until when the consumer should be paused.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

ValueTask<ConsumerPauseResponse>

Result of pausing the consumer.

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.