JobQueueOptions interface
Everything a job queue needs to connect and behave, given to every constructor in this package.
Only JobQueueOptions.name is required. The rest tune the broker connection, the delivery guarantee and logging, and each carries the default that applies when it is omitted.
Signature:
export interface JobQueueOptions
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
[] |
(Optional) Broker nodes to connect to, as host/port pairs. The broker is Redis. | ||
|
boolean |
(Optional) Drain jobs still being handled before shutting down on | ||
|
boolean |
(Optional) Put jobs the drain gave up on back on the queue before exiting. | ||
|
number |
(Optional) Milliseconds a drain waits for jobs in flight before giving up on them. Ignored unless JobQueueOptions.drain is on. | ||
|
ILogger |
(Optional) Logger for the queue's own log and error messages. | ||
|
string |
Name of the job queue. Required. This is the queue's identity, not a label: a JobQueueWorker and a JobQueuePublisher that share a name are two ends of one queue, and two that do not are unrelated queues that will never see each other's jobs. | ||
|
string |
(Optional) Password for authenticating against the broker. | ||
|
string |
(Optional) Prefix for every key this queue creates in the broker. | ||
|
boolean |
(Optional) Whether a job is handed to a worker under a lock, so that a worker dying before it starts does not take the job with it. | ||
|
number |
(Optional) How long, in milliseconds, a job may sit checked out to a worker during safe delivery before it is treated as abandoned. | ||
|
IMQOptions['tls'] |
(Optional) Encrypts the broker connection with TLS. | ||
|
string |
(Optional) Username for authenticating against the broker. Omit it on a broker that takes a password alone, which is the usual Redis setup. | ||
|
boolean |
(Optional) Enables the queue's informational tracing. | ||
|
boolean |
(Optional) Adds message bodies to the verbose tracing. |
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.