Method GetStreamAsync
GetStreamAsync(string, StreamInfoRequest?, CancellationToken)
Get stream information from the server and creates a NATS JetStream stream object NatsJSStream.
ValueTask<INatsJSStream> GetStreamAsync(string stream, StreamInfoRequest? request = null, CancellationToken cancellationToken = default)
Parameters
streamstringName of the stream to retrieve.
requestStreamInfoRequestStream info request options
cancellationTokenCancellationTokenA CancellationToken used to cancel the API call.
Returns
- ValueTask<INatsJSStream>
The NATS JetStream stream object which can be used to manage the stream.
Exceptions
- NatsJSException
There was an issue retrieving the response.
- NatsJSApiException
Server responded with an error.