Method PurgeStreamAsync
PurgeStreamAsync(string, StreamPurgeRequest, CancellationToken)
Purges all of the (or filtered) data in a stream, leaves the stream.
ValueTask<StreamPurgeResponse> PurgeStreamAsync(string stream, StreamPurgeRequest request, CancellationToken cancellationToken = default)
Parameters
streamstringStream name to be purged.
requestStreamPurgeRequestPurge request.
cancellationTokenCancellationTokenA CancellationToken used to cancel the API call.
Returns
- ValueTask<StreamPurgeResponse>
Purge response
Exceptions
- NatsJSException
There was an issue retrieving the response.
- NatsJSApiException
Server responded with an error.