Interface ConsumerOpts


  • ConsumerOpts


callbackFn?: JsMsgCallback

An optional callback to process messages - note that iterators are the preferred way of processing messages.

config: Partial<ConsumerConfig>

The consumer configuration

isBind?: boolean

If true, the client will only attempt to bind to the specified consumer name/durable on the specified stream. If the consumer is not found, the subscribe will fail

mack: boolean

Enable manual ack. When set to true, the client is responsible to ack messages.

max?: number

Standard option for all subscriptions. Defines the maximum number of messages dispatched by the server before stopping the subscription. For JetStream this may not be accurate as JetStream can add additional protocol messages that could count towards this limit.

name?: string

The consumer name

ordered: boolean

Only applicable to push consumers. When set to true, the consumer will be an ordered consumer.

queue?: string

Only applicable to push consumers, allows the pull subscriber to horizontally load balance.

stream: string

The name of the stream

Generated using TypeDoc