Method CreateOrUpdateStreamAsync
CreateOrUpdateStreamAsync(StreamConfig, CancellationToken)
Creates a new stream if it doesn't exist or update if the stream already exists.
ValueTask<INatsJSStream> CreateOrUpdateStreamAsync(StreamConfig config, CancellationToken cancellationToken = default)
Parameters
configStreamConfigStream configuration request to be sent to NATS JetStream server.
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.
- ArgumentException
The stream name in
configis invalid.- ArgumentNullException
The name in
configisnull.