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

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

Sets any unknown or user-defined event handler, which would fire only one single time

**Signature:**

```typescript
once(event: string | symbol, listener: (...args: any[]) => void): this;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| event | string \| symbol | event name |
| listener | (...args: any\[\]) => void | event handler |


**Returns:**

this

