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
stream
stringStream name to be purged.
request
StreamPurgeRequestPurge request.
cancellationToken
CancellationTokenA 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.