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. | ||
|
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. | |||
|
string |
(Optional) Global key namespace for everything this queue writes. | ||
|
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 the processing too, not only the hand-off: the worker key is held until the A message comes back on either of two counts. The owning process leaving the broker's client list catches it dying — a fact the broker holds rather than an inference from a clock, so it is noticed as fast as the socket closes and nothing has to be renewed to keep a live lease alive. IMQOptions.safeDeliveryTtl catches what liveness cannot see: one handler wedged inside a worker that is otherwise up and serving. Delivery is at-least-once in either mode, so handlers should be idempotent: this narrows the window in which in-flight work is lost, it does not close it. | ||
|
number |
(Optional) The longest (in milliseconds) a message may be worked on before it is treated as abandoned and moved back onto the queue. | ||
|
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, and the only supported value. | ||
|
boolean |
(Optional) Enables/disables verbose logging. | ||
|
boolean |
(Optional) Enables/disables extended verbose logging. | ||
|
number |
(Optional) Interval in milliseconds of the periodic watcher check. |
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.