# PgPubSubOptions interface · @imqueue/pg-pubsub

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

Options accepted as option argument of PgPubSub constructor. It extends `pg.ClientConfig` options, mostly because it is used to construct PostgreSQL database connection, adding more properties required to configure PgPubSub objects behavior.

**Signature:**

```typescript
export interface PgPubSubOptions extends ClientConfig 
```
**Extends:** ClientConfig

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [acquireInterval](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.pgpubsuboptions.acquireinterval/) |  | number | Time interval in milliseconds before `LISTEN` clients would re-try to acquire channel locks. It works from one hand as connection keep-alive periodical pings, from other hand adds additional level of reliability for the cases when connection, which holds the lock has been suddenly disconnected in a silent manner. By default is set to `30000ms` (`30sec`). Please, assume this value should be selected for a particular system with care of often acquire lock hits and overall infrastructure reliability. |
| [executionLock](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.pgpubsuboptions.executionlock/) |  | boolean | If set to true, all instances become listeners but only instance is an executor which still implements inter-process locking mechanism. |
| [filtered](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.pgpubsuboptions.filtered/) |  | boolean | If set to true, self emitted messages (those which were sent using `NOTIFY` on the same connection) will be filtered on this connection. By default is false - means that connection will `LISTEN` to the messages, which were notified on the same connection. |
| [handleSignals](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.pgpubsuboptions.handlesignals/) |  | boolean | If set to true, the package registers SIGINT/SIGTERM/SIGABRT handlers performing graceful locks release and process exit. Default is false: a library must not take over process lifecycle unless asked to. |
| [pgClient?](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.pgpubsuboptions.pgclient/) |  | Client | _(Optional)_ Existing PostgreSQL client connection (optional). Can be passed if there is a need to re-use existing db connection from external code. Otherwise it is required to bypass correct options to instantiate new `pg.Client` connection properly. |
| [retryDelay](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.pgpubsuboptions.retrydelay/) |  | number | Specifies delay in milliseconds between re-connection retries |
| [retryLimit](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.pgpubsuboptions.retrylimit/) |  | number | Specifies maximum number of re-connection retries to process, before connection would be treated as broken (disconnected). By default is set to infinite number of retries. |
| [singleListener](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.pgpubsuboptions.singlelistener/) |  | boolean | Boolean flag, which turns off/on single listener mode. By default is set to true, so instantiated PgPubSub connections will act using inter-process locking mechanism. |

