Interface ConsumerConfig

Hierarchy

Properties

ack_policy: AckPolicy

The type of acknowledgment required by the Consumer

ack_wait?: number

How long (in nanoseconds) to allow messages to remain un-acknowledged before attempting redelivery

backoff?: number[]

List of durations in nanoseconds format that represents a retry timescale for NaK'd messages or those being normally retried

deliver_group?: string

Allows push consumers to form a queue group

Deprecated

deliver_policy: DeliverPolicy

Where to start consuming messages on the stream

deliver_subject?: string

The subject where the push consumer should be sent the messages

Deprecated

description?: string

A short description of the purpose of this consume

durable_name?: string

A unique name for a durable consumer Set name - for ephemeral consumers, also set idle_heartbeat

filter_subject?: string

Deliver only messages that match the subject filter This is exclusive of filter_subjects

filter_subjects?: string[]

Deliver only messages that match the specified filters. This is exclusive of filter_subject.

flow_control?: boolean

For push consumers this will regularly send an empty mess with Status header 100 and a reply subject, consumers must reply to these messages to control the rate of message delivery.

headers_only?: boolean

Delivers only the headers of messages in the stream and not the bodies. Additionally, adds Nats-Msg-Size MessageSizeHdr header to indicate the size of the removed payload

idle_heartbeat?: number

If the Consumer is idle for more than this many nanoseconds an empty message with Status header 100 will be sent indicating the consumer is still alive

inactive_threshold?: number

Duration that instructs the server to clean up ephemeral consumers that are inactive for that long

max_ack_pending?: number

The maximum number of messages without acknowledgement that can be outstanding, once this limit is reached message delivery will be suspended

max_batch?: number

The largest batch property that may be specified when doing a pull on a Pull Consumer

max_bytes?: number

The maximum bytes value that maybe set when dong a pull on a Pull Consumer

max_deliver?: number

The number of times a message will be redelivered to consumers if not acknowledged in time

max_expires?: number

The maximum expires value that may be set when doing a pull on a Pull Consumer

max_waiting?: number

The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored

mem_storage?: boolean

Force the consumer state to be kept in memory rather than inherit the setting from the stream

metadata?: Record<string, string>

Metadata field to store additional information about the consumer. Note that keys starting with _nats are reserved. This feature only supported on servers 2.10.x and better.

name?: string

The consumer name

num_replicas?: number

When set do not inherit the replica count from the stream but specifically set it to this amount.

opt_start_seq?: number

The sequence from which to start delivery messages. Requires StartSequence

opt_start_time?: string

The date time from which to start delivering messages Requires StartTime

pause_until?: string

Creates a consumer that is initially paused, but will resume at the specified Date and time. Specified as an ISO date time string (Date#toISOString()).

rate_limit_bps?: number

The rate at which messages will be delivered to clients, expressed in bytes per second

replay_policy: ReplayPolicy

How messages are played back to the Consumer

Generated using TypeDoc