Table of Contents

Method DeleteConsumerAsync

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

DeleteConsumerAsync(string, CancellationToken)

Delete a consumer from this stream.

ValueTask<bool> DeleteConsumerAsync(string consumer, CancellationToken cancellationToken = default)

Parameters

consumer string

Consumer name to be deleted.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

ValueTask<bool>

Whether the deletion was successful.

Exceptions

NatsJSException

There is an error retrieving the response or this consumer object isn't valid anymore because it was deleted earlier.

NatsJSApiException

Server responded with an error.