Home > @imqueue/core > ICluster
ICluster interface
Membership callbacks a clustered queue hands to a ClusterManager so the manager can add and remove servers as it discovers them.
Implement this to feed a clustered queue from your own discovery mechanism; ClusteredRedisQueue supplies an implementation of its own.
Signature:
export interface ICluster
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
(server: IServerInput) => IMessageQueueConnection |
Adds a server to the cluster and returns its registration record. Registration is idempotent — an already-known server is returned unchanged. | ||
|
(server: IServerInput) => IMessageQueueConnection | undefined |
Looks a server up, matching by | ||
|
(server: IServerInput) => void |
Removes a server from the cluster. A no-op when the server is unknown. |