Method PauseConsumerAsync
PauseConsumerAsync(string, string, DateTimeOffset, CancellationToken)
Pause a consumer.
public ValueTask<ConsumerPauseResponse> PauseConsumerAsync(string stream, string consumer, DateTimeOffset pauseUntil, CancellationToken cancellationToken = default)
Parameters
streamstringStream name where consumer is associated to.
consumerstringConsumer name to be paused.
pauseUntilDateTimeOffsetUntil when the consumer should be paused.
cancellationTokenCancellationTokenA 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
streamname is invalid.- ArgumentNullException
The
streamname isnull.