Method ListStreamsAsync
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
stringLimit the list to streams matching this subject filter.
cancellationToken
CancellationTokenA 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.