Table of Contents

Method ListStreamsAsync

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

ListStreamsAsync(string?, CancellationToken)

Enumerates through the streams exists on the NATS JetStream server.

public IAsyncEnumerable<INatsJSStream> ListStreamsAsync(string? subject = null, CancellationToken cancellationToken = default)

Parameters

subject string

Limit the list to streams matching this subject filter.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

IAsyncEnumerable<INatsJSStream>

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

Exceptions

NatsJSException

There was an issue retrieving the response.

NatsJSApiException

Server responded with an error.