CreateConsumerAsync Method
Definition
- Namespace
- Savvyio.Extensions.NATS.Commands
- Assemblies
- Savvyio.Extensions.NATS.dll
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
streamConfigStreamConfigThe stream configuration.
consumerConfigConsumerConfigThe consumer configuration.
cancellationTokenCancellationTokenThe cancellation token of the asynchronous operation.
Returns
- Task<INatsJSConsumer>
A consumer that can fetch messages.