Table of Contents

Method CreateOrderedConsumerAsync

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

CreateOrderedConsumerAsync(string, NatsJSOrderedConsumerOpts?, CancellationToken)

Creates new ordered consumer.

ValueTask<INatsJSConsumer> CreateOrderedConsumerAsync(string stream, NatsJSOrderedConsumerOpts? opts = null, CancellationToken cancellationToken = default)

Parameters

stream string

Stream name to create the consumer under.

opts NatsJSOrderedConsumerOpts

Ordered consumer options.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

ValueTask<INatsJSConsumer>

The NATS JetStream consumer object which can be used retrieving ordered data from the stream.

Exceptions

ArgumentException

The stream name is invalid.

ArgumentNullException

The stream name is null.