# notify() function · @imqueue/pg-pubsub

Source: https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.notify/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-pubsub 3.0.5 — generated reference, not hand-written

`'notify'` event occurs each time new message has been published to a particular channel. Occurs right after database NOTIFY command succeeded.

**Signature:**

```typescript
export declare function notify(chan: string, payload: AnyJson): void;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| chan | string | channel to which notification was sent |
| payload | [AnyJson](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.anyjson/) | notification message payload |


**Returns:**

void

