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

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

Sets `'listen'` event handler, which fired only one single time

**Signature:**

```typescript
once(event: 'listen', listener: typeof listen): this;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| event | 'listen' | `'listen'` — this process began listening one or more channels |
| listener | typeof listen | handler invoked when this process began listening one or more channels. Fires at most once. |


**Returns:**

this

