Interface INatsJSPushConsumer
Represents a NATS JetStream push consumer.
public interface INatsJSPushConsumer : INatsJSConsumer
- Inherited Members
Remarks
A push consumer is a JetStream consumer that delivers messages to a client subscription on a subject (the consumer's delivery subject). The server pushes messages and control messages (heartbeats and flow-control requests) to that subject as long as at least one subscriber is active on it.
The NATS server manages delivery to the delivery subject, and messages are obtained with ConsumeAsync<T>(INatsDeserialize<T>?, NatsJSConsumeOpts?, CancellationToken). The receipt of heartbeats and flow-control requests is handled automatically by the client.
A push consumer does not support pull-based operations such as NextAsync<T>(INatsDeserialize<T>?, NatsJSNextOpts?, CancellationToken), FetchAsync<T>(NatsJSFetchOpts, INatsDeserialize<T>?, CancellationToken), FetchNoWaitAsync<T>(NatsJSFetchOpts, INatsDeserialize<T>?, CancellationToken) or UnpinAsync(string, CancellationToken) which are only available for pull (work-queue) consumers and throw NatsJSProtocolException when called.