Table of Contents

Interface INatsJSContext

Namespace
NATS.Client.JetStream
Assembly
NATS.Client.JetStream.dll
public interface INatsJSContext

Methods

CreateOrUpdateConsumerAsync(string, ConsumerConfig, CancellationToken)

Creates new consumer if it doesn't exists or updates an existing one with the same name.

CreateOrderedConsumerAsync(string, NatsJSOrderedConsumerOpts?, CancellationToken)

Creates new ordered consumer.

CreateStreamAsync(StreamConfig, CancellationToken)

Creates a new stream if it doesn't exist or returns an existing stream with the same name.

DeleteConsumerAsync(string, string, CancellationToken)

Delete a consumer from a stream.

DeleteMessageAsync(string, StreamMsgDeleteRequest, CancellationToken)

Deletes a message from a stream.

DeleteStreamAsync(string, CancellationToken)

Deletes a stream.

GetAccountInfoAsync(CancellationToken)

Calls JetStream Account Info API.

GetConsumerAsync(string, string, CancellationToken)

Gets consumer information from the server and creates a NATS JetStream consumer NatsJSConsumer.

GetStreamAsync(string, StreamInfoRequest?, CancellationToken)

Get stream information from the server and creates a NATS JetStream stream object NatsJSStream.

ListConsumerNamesAsync(string, CancellationToken)

Enumerates through consumer names belonging to a stream.

ListConsumersAsync(string, CancellationToken)

Enumerates through consumers belonging to a stream.

ListStreamNamesAsync(string?, CancellationToken)

List stream names.

ListStreamsAsync(string?, CancellationToken)

Enumerates through the streams exists on the NATS JetStream server.

PauseConsumerAsync(string, string, DateTimeOffset, CancellationToken)

Pause a consumer.

PublishAsync<T>(string, T?, INatsSerialize<T>?, NatsJSPubOpts?, NatsHeaders?, CancellationToken)

Sends data to a stream associated with the subject.

PurgeStreamAsync(string, StreamPurgeRequest, CancellationToken)

Purges all of the (or filtered) data in a stream, leaves the stream.

ResumeConsumerAsync(string, string, CancellationToken)

Resume a (paused) consumer.

UpdateStreamAsync(StreamConfig, CancellationToken)

Update a NATS JetStream stream's properties.