IMQOptions interface
Options accepted by every queue implementation.
Anything omitted falls back to DEFAULT_IMQ_OPTIONS — localhost:6379, prefix imq, cleanup off, safe delivery off, gzip off, a 5000 ms watcher check and safe-delivery TTL, and signal handling on.
Signature:
export interface IMQOptions extends Partial<IMessageQueueConnection>
Extends: Partial<IMessageQueueConnection>
Remarks
Only cleanup and cleanupFilter are required by the type, even though every constructor and IMQ.create() accepts a Partial<IMQOptions> — prefer Partial<IMQOptions> when declaring option literals.
The inherited id is meaningful only on IMQOptions.cluster entries; the queue itself never reads it.
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
boolean |
Turns on/off the watcher's periodic removal of orphaned keys. Defaults to | ||
|
string |
Redis glob pattern, appended to the prefix as | ||
|
(Optional) Redis servers to spread this queue across. Supplying this — or IMQOptions.clusterManagers — makes IMQ.create() return a ClusteredRedisQueue. | |||
|
(Optional) Cluster managers that discover and maintain cluster servers dynamically. Supplying this — or IMQOptions.cluster — makes IMQ.create() return a ClusteredRedisQueue. | |||
|
boolean |
(Optional) Enable process signal handling (SIGTERM, SIGINT, SIGABRT) by the queue. When enabled, the queue releases its watcher lock on these signals and then exits the process. It does not wait for in-flight | ||
|
(Optional) Logger used for queue diagnostics. Defaults to | |||
|
string |
(Optional) Global key namespace for everything this queue writes. Defaults to | ||
|
boolean |
(Optional) Enable guaranteed message delivery. When enabled, reading a message moves it atomically out of the queue into a worker-owned key instead of popping it outright, so a worker that dies before it even starts on a message leaves that message behind for the watcher to re-queue rather than taking it down with the process. The guarantee covers that hand-off, not the processing. The worker key is released as soon as the message is dispatched to the | ||
|
number |
(Optional) Lease deadline (in milliseconds) stamped onto the worker key when safeDelivery moves a message out of the queue, and the interval on which the watcher sweeps for expired keys. A worker key still present once its deadline has passed is treated as abandoned, and its message is moved back onto the main queue. This is a recovery deadline for an abandoned hand-off, not a processing deadline. The key is released when the message is dispatched, so a slow handler is neither interrupted nor re-queued for taking too long, and raising this value extends no protection over long-running work — tune it for how quickly an abandoned message should come back. | ||
|
boolean |
(Optional) Enable message compression for serialization. Increases a worker CPU load but decreases network traffic between workers and the queue host. Defaults to | ||
|
string |
(Optional) Queue adapter vendor name. Defaults to | ||
|
boolean |
(Optional) Enables/disables verbose logging. | ||
|
boolean |
(Optional) Enables/disables extended verbose logging. | ||
|
number |
(Optional) Interval in milliseconds of the periodic watcher check. Defaults to 5000. |
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.