Table of Contents

Method DeleteMessageAsync

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

DeleteMessageAsync(string, StreamMsgDeleteRequest, CancellationToken)

Deletes a message from a stream.

public ValueTask<StreamMsgDeleteResponse> DeleteMessageAsync(string stream, StreamMsgDeleteRequest request, CancellationToken cancellationToken = default)

Parameters

stream string

Stream name to delete message from.

request StreamMsgDeleteRequest

Delete message request.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

ValueTask<StreamMsgDeleteResponse>

Delete message response

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.