# IMQService.publish() method · @imqueue/rpc

Source: https://imqueue.org/api/rpc/latest/rpc.imqservice.publish/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/rpc 3.5.3 — generated reference, not hand-written

Broadcasts data on this service's pub/sub channel, delivering it to every client currently subscribed to this service.

**Signature:**

```typescript
publish(data: JsonObject): Promise<void>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| data | JsonObject | JSON-serializable payload to broadcast |


**Returns:**

Promise<void>

## Exceptions

TypeError when the service has not been started, so the queue's writer is not connected

## Remarks

Fire-and-forget: plain pub/sub with no persistence, ordering guarantee or delivery confirmation, so subscribers that are offline lose the message.

