Home > @imqueue/core > RedisQueue
RedisQueue class
Class RedisQueue Implements a simple messaging queue over redis.
Signature:
export declare class RedisQueue extends EventEmitter<EventMap> implements IMessageQueue
Extends: EventEmitter<EventMap>
Implements: IMessageQueue
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
boolean |
Returns false only when this queue is known to be unable to accept writes right now — i.e., it has a writer connection currently in a non-ready (reconnecting/closed) state. A queue that has not yet connected is considered available, since a sending lazily connects it. Used for health-aware routing in the clustered queue. | |
|
string | |||
|
This queue instance options {IMQOptions} | |||
|
|
string |
This queue instance unique key (identifier), for internal use |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Clears queue data in redis | ||
|
Gracefully destroys this queue handle. Does not remove queue data from redis unless clearData is explicitly set to true, so that destroying one handle (e.g., on scale-down) never wipes messages still pending for other producers/consumers. | ||
|
Returns true if publisher mode is enabled on this queue, false otherwise. | ||
|
Returns true if worker mode is enabled on this queue, false otherwise. | ||
|
Publishes a message to this queue subscription channel for currently subscribed clients. If toName specified will publish to PubSub with a different name. This can be used to implement broadcasting some messages to other subscribers on other PubSub channels. | ||
|
Retrieves the current count of messages in the queue | ||
|
Sends a given message to a given queue (by name) | ||
|
Initializes and starts current queue routines | ||
|
Stops current queue routines | ||
|
Creates a subscription channel over redis and sets up channel data read handler | ||
|
Closes subscription channel |