Ack'ing a message implicitly acks all messages with a lower sequence
Consumer will ack all messages - not that unless manualAck is set the client will auto ack messages after processing via its callback or when the iterator continues processing.
Consumer will not track ack for messages
Sets the time a delivered message might remain unacknowledged before a redelivery is attempted
Bind to the specified durable (or consumer name if ephemeral) on the specified stream. If the consumer doesn't exist, the subscribe will fail. Bind the recommended way of subscribing to a stream, as it requires the consumer to exist already.
Specify the name of the stream, avoiding a lookup where the stream is located by searching for a subject.
Use a callback to process messages. If not specified, you process messages by iterating on the returned subscription object.
The name of the consumer
Consumer will start at first available message on the stream
Push consumer only option - Sets the name of the queue group - same as queue
Consumer will start at the last message
Consumer will deliver all the last per messages per subject
Consumer will start with new messages (not yet in the stream)
DeliverTo sets the subject where a push consumer receives messages
User description of this consumer
Sets the durable name, when not set an ephemeral consumer is created
Consumer should filter the messages to those that match the specified filter. This api can be called multiple times.
Push consumer flow control - the server sends a status code 100 and uses the delay on the response to throttle inbound messages for a client and prevent slow consumer.
Messages delivered to the consumer will not have a payload. Instead,
they will have the header Nats-Msg-Size
indicating the number of bytes
in the message as stored by JetStream.
Push consumer only option - Enables idle heartbeats from the server. If the number of specified millis is reached and no messages are available on the server, the server will send a heartbeat (status code 100 message) indicating that the JetStream consumer is alive.
Pull consumer only - Sets the max amount of time that an ephemeral consumer will be allowed to live on the server. If the client doesn't perform any requests during the specified interval the server will discard the consumer.
Limit message delivery to the specified rate in bits per second.
Prevents the consumer implementation from auto-acking messages. Message callbacks and iterators must explicitly ack messages.
Max number of outstanding acks before the server stops sending new messages
Max number of re-delivery attempts for a particular message
Standard NATS subscription option which automatically closes the subscription after the specified number of messages (actual stream or flow control) are seen by the client.
Pull consumer only - Sets the max number of messages that can be pulled in a batch that can be requested by a client during a pull.
Pull consumer only - Sets the max amount of time before a pull request expires that may be requested by a client during a pull.
Pull subscriber option only. Limits the maximum outstanding messages scheduled via batch pulls as pulls are additive.
Force the consumer state to be kept in memory rather than inherit the setting from the Stream
When set do not inherit the replica count from the stream but specifically set it to this amount
Push consumer only - creates an ordered consumer - ordered consumers cannot be a pull consumer nor specify durable, deliverTo, specify an ack policy, maxDeliver, or flow control.
Push consumer only option - Standard NATS queue group option, same as deliverGroup
Replay messages as fast as possible
Replay at the rate received
Sample a subset of messages expressed as a percentage(0-100)
Start delivering at the at a past point in time
The consumer will start at the message with the specified sequence
consumer will start with messages received on the specified time/date
Generated using TypeDoc
A builder API that creates a ConsumerOpt