ClusteredRedisQueue.(constructor)

Creates a clustered queue.

Signature:

constructor(
    name: string, options?: Partial<IMQOptions>, _mode?: IMQMode);

Parameters

Parameter

Type

Description

name

string

queue name, used as the queue name for every per-host queue in the cluster

options

Partial<IMQOptions>

(Optional) queue options; must supply IMQOptions.cluster, IMQOptions.clusterManagers, or both

_mode

IMQMode

(Optional) accepted only for IMessageQueueConstructor signature compatibility and ignored: the underlying queues always run in IMQMode.BOTH

Exceptions

TypeError when neither cluster nor a non-empty clusterManagers is supplied

Remarks

Construction is not inert. One RedisQueue is created per static cluster entry, and every cluster manager is initialized immediately — so dynamically discovered servers can join before ClusteredRedisQueue.start() is ever called.

Cluster entries contribute only id, host and port. All other connection settings, including username and password, are inherited from the top-level options, so per-server credentials in a cluster entry are ignored.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.