Skip to content

Type Alias: QueueConsumerOptions ​

QueueConsumerOptions = object

How a consumer processes a queue (Queue.consume; the options of QueueAction).

Properties ​

attempts? ​

optional attempts?: number

The deliveries of a message before it goes to the dead letter queue.

Default ​

the defaults.attempts of the queue (3)


backoff? ​

optional backoff?: Backoff

The wait before a message is delivered again after a failed attempt.

Default ​

the defaults.backoff of the queue


concurrency? ​

optional concurrency?: number

The messages processed at once by this instance.

Default ​

the defaults.concurrency of the queue (1)


group? ​

optional group?: string

The group: the instances of a group share the messages, each group receives every message.

Default ​

the defaults.group of the queue, else the appId of the application


onError? ​

optional onError?: (error, context) => void | Promise<void>

Called for each failure (retried or not), before the retry or the dead letter.

Parameters ​

error ​

unknown

context ​

QueueJobContext

Returns ​

void | Promise<void>


ordered? ​

optional ordered?: boolean

Process the messages of one key in their order, one at a time (the driver must support it).

Default ​

ts
false

output? ​

optional output?: string

The queue the value returned goes to, as a new message (an object; undefined sends nothing).

Default ​

ts
none

timeout? ​

optional timeout?: Duration

The processing time limit of a message (aborted, then retried).

Default ​

the defaults.timeout of the queue (no limit)

Released under the MIT License.