Table of Contents

Method DeleteStreamAsync

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

DeleteStreamAsync(string, CancellationToken)

Deletes a stream.

public ValueTask<bool> DeleteStreamAsync(string stream, CancellationToken cancellationToken = default)

Parameters

stream string

Stream name to be deleted.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

ValueTask<bool>

Whether delete was successful or not.

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.