You're viewing archived documentation for @imqueue/core v1.15.0. APIs may differ from the current release. View the latest version ↗

ClusteredRedisQueue class

Class ClusteredRedisQueue Implements possibility to scale queues horizontally between several redis instances.

Signature:

export declare class ClusteredRedisQueue implements IMessageQueue, EventEmitter 

Implements: IMessageQueue, EventEmitter

Constructors

Constructor

Modifiers

Description

(constructor)(name, options, mode)

Class constructor

Properties

Property

Modifiers

Type

Description

logger

ILogger

Logger instance associated with this queue instance

{ILogger}

name

string

Methods

Method

Modifiers

Description

addListener(args)

clear()

Clears queue data in queue host application. Supposed to be an async function.

destroy()

Safely destroys current queue, unregistered all set event listeners and connections. Supposed to be an async function.

emit(args)

eventNames(args)

getMaxListeners()

listenerCount(args)

listeners(args)

off(args)

on(args)

once(args)

prependListener(args)

prependOnceListener(args)

publish(data, toName)

rawListeners(args)

removeAllListeners(args)

removeListener(args)

send(toQueue, message, delay, errorHandler)

Sends a message to given queue name with the given data. Supposed to be an async function.

setMaxListeners(args)

start()

Starts the messaging queue. Supposed to be an async function.

stop()

Stops the queue (should stop handle queue messages). Supposed to be an async function.

subscribe(channel, handler)

unsubscribe()