Skip to content

Type Alias: JobOptions ​

JobOptions = object

The options of a message (Queue.add).

Properties ​

attempts? ​

optional attempts?: number

The attempts of this message, instead of the ones of its consumers.


backoff? ​

optional backoff?: Backoff

The backoff of this message, instead of the one of its consumers.


dedupe? ​

optional dedupe?: boolean

Drop the message when one of the same jobId is kept by the queue (the driver must support it).

Default ​

ts
false

delay? ​

optional delay?: Duration

The delay before its first delivery.

Default ​

ts
none

headers? ​

optional headers?: Record<string, string>

Headers of the application (the prefix x-lkt- is reserved).


jobId? ​

optional jobId?: string

The id of the message.

Default ​

ts
a random UUID

key? ​

optional key?: string

Its ordering key: the ordered consumers process the messages of a key in their order.

Default ​

ts
none

priority? ​

optional priority?: number

Its priority: the greater first (the driver must support it).

Default ​

ts
0

Released under the MIT License.