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

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

Sends a message to one server of the cluster, selected by health-aware round-robin.

**Signature:**

```typescript
send(toQueue: string, message: JsonObject, delay?: number, errorHandler?: (err: Error) => void): Promise<string>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| toQueue | string | queue name to which a message should be sent to |
| message | [JsonObject](https://imqueue.org/api/core/latest/core.jsonobject/) | message data |
| delay | number | _(Optional)_ if specified, a message will be handled in the target queue after a specified period of time in milliseconds |
| errorHandler | (err: Error) => void | _(Optional)_ callback called only when an internal error occurs during message send execution |


**Returns:**

Promise<string>

message identifier

## Exceptions

TypeError propagated from the selected server when it is in [IMQMode.WORKER](https://imqueue.org/api/core/latest/core.imqmode/)-only mode

## Remarks

This is the one operation that does not fan out — the message goes to a single server, and not to a stable one.

When the cluster currently has no servers the send is held until the first server becomes ready, and rejects if none appears within 30 seconds (override with the `IMQ_SEND_INIT_TIMEOUT` environment variable, in milliseconds).

