Table of Contents

Class NatsJSConsumer

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

Represents a NATS JetStream consumer.

public class NatsJSConsumer : INatsJSConsumer
Inheritance
NatsJSConsumer
Implements
Inherited Members

Properties

Info

Consumer info object as retrieved from NATS JetStream server at the time this object was created, updated or refreshed.

Methods

ConsumeAsync<T>(INatsDeserialize<T>?, NatsJSConsumeOpts?, CancellationToken)

Starts an enumerator consuming messages from the stream using this consumer.

DeleteAsync(CancellationToken)

Delete this consumer.

FetchAsync<T>(NatsJSFetchOpts, INatsDeserialize<T>?, CancellationToken)

Consume a set number of messages from the stream using this consumer.

FetchNoWaitAsync<T>(NatsJSFetchOpts, INatsDeserialize<T>?, CancellationToken)

Consume a set number of messages from the stream using this consumer. Returns immediately if no messages are available.

NextAsync<T>(INatsDeserialize<T>?, NatsJSNextOpts?, CancellationToken)

Consume a single message from the stream using this consumer.

RefreshAsync(CancellationToken)

Retrieve the consumer info from the server and update this consumer.

ResetAsync(ulong, CancellationToken)

Reset this consumer's delivery state and update this consumer.

UnpinAsync(string, CancellationToken)

Unpins this consumer from the current pinned client.