Table of Contents

Method ListConsumerNamesAsync

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

ListConsumerNamesAsync(CancellationToken)

Enumerates through consumers names belonging to this stream.

IAsyncEnumerable<string> ListConsumerNamesAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

IAsyncEnumerable<string>

Async enumerable of consumer names. Can be used in a await foreach loop.

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.