Table of Contents

CreateConsumerAsync Method

Definition

Namespace
Savvyio.Extensions.NATS.Commands
Assemblies
Savvyio.Extensions.NATS.dll
Source
src/Savvyio.Extensions.NATS/Commands/NatsCommandQueue.cs

CreateConsumerAsync(StreamConfig, ConsumerConfig, CancellationToken)

Creates or updates the stream and consumer used by receive operations.

protected virtual Task<INatsJSConsumer> CreateConsumerAsync(StreamConfig streamConfig, ConsumerConfig consumerConfig, CancellationToken cancellationToken)

Parameters

streamConfig StreamConfig

The stream configuration.

consumerConfig ConsumerConfig

The consumer configuration.

cancellationToken CancellationToken

The cancellation token of the asynchronous operation.

Returns

Task<INatsJSConsumer>

A consumer that can fetch messages.