Table of Contents

Method ListConsumerNamesAsync

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

ListConsumerNamesAsync(string, CancellationToken)

Enumerates through consumer names belonging to a stream.

IAsyncEnumerable<string> ListConsumerNamesAsync(string stream, CancellationToken cancellationToken = default)

Parameters

stream string

Stream name the consumers belong to.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

IAsyncEnumerable<string>

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

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.