Method CreateOrderedConsumerAsync
CreateOrderedConsumerAsync(string, NatsJSOrderedConsumerOpts?, CancellationToken)
Creates new ordered consumer.
ValueTask<INatsJSConsumer> CreateOrderedConsumerAsync(string stream, NatsJSOrderedConsumerOpts? opts = null, CancellationToken cancellationToken = default)
Parameters
stream
stringStream name to create the consumer under.
opts
NatsJSOrderedConsumerOptsOrdered consumer options.
cancellationToken
CancellationTokenA 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 isnull
.