# ClusteredRedisQueue.addServer() method · @imqueue/core

Source: https://imqueue.org/api/core/latest/core.clusteredredisqueue.addserver/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/core 3.3.2 — generated reference, not hand-written

Adds a single server to the cluster and returns its registration record.

**Signature:**

```typescript
protected addServer(server: IServerInput): ClusterServer;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| server | [IServerInput](https://imqueue.org/api/core/latest/core.iserverinput/) | address of the server to add |


**Returns:**

[ClusterServer](https://imqueue.org/api/core/latest/core.clusterserver/)

the registration record: the resolved `id`, `host` and `port` plus the [RedisQueue](https://imqueue.org/api/core/latest/core.redisqueue/) instance (`imq`) created for that host, so callers can inspect or address that specific host

## Remarks

Registration is idempotent, and the match rule is broader than an id comparison: a server counts as already present when its `id` matches an existing entry or when its host and port do. Two different ids on the same host and port are therefore treated as one server, and the existing record is returned unchanged without creating a queue.

For a genuinely new server this returns as soon as the record is created — starting the queue and re-applying any active subscription happen asynchronously afterwards.

