# PgPubSub.on() method · @imqueue/pg-pubsub

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

Sets `'unlisten'` event handler

**Signature:**

```typescript
on(event: 'unlisten', listener: typeof unlisten): this;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| event | 'unlisten' | `'unlisten'` — this process stopped listening one or more channels |
| listener | typeof unlisten | handler invoked when this process stopped listening one or more channels. |


**Returns:**

this

