Skip to main content

PostgresPubSubParameters

@webda/postgres


Class: PostgresPubSubParameters

Defined in: postgres/src/postgrespubsub.service.ts:18

Configuration for PostgresPubSubService.

Extends​

  • ServiceParameters

Constructors​

Constructor​

new PostgresPubSubParameters(): PostgresPubSubParameters

Returns​

PostgresPubSubParameters

Inherited from​

ServiceParameters.constructor

Properties​

channel?​

optional channel?: string

Defined in: postgres/src/postgrespubsub.service.ts:28

Channel name passed to LISTEN / NOTIFY. Must be a valid Postgres identifier (lowercased, no quoting). Defaults to the service name.

Pattern​

/^[a-z_][a-z0-9_]*$/

Examples​

"myapp_events"
"user_notifications"
"cache_invalidation"
"orders"

postgresqlServer?​

optional postgresqlServer?: ClientConfig

Defined in: postgres/src/postgrespubsub.service.ts:36

Connection settings forwarded to pg.Client. By default pg reads standard PG* environment variables.

Can be encrypted with webda config encrypt

Secret​

password,connectionString


reconnectDelay?​

optional reconnectDelay?: number

Defined in: postgres/src/postgrespubsub.service.ts:44

Reconnect delay in milliseconds when the LISTEN connection drops. A randomized jitter is added to keep crash-loop reconnects from stampeding.

Default​

500

type​

type: string

Defined in: core/lib/services/serviceparameters.d.ts:9

Type of the service

Inherited from​

ServiceParameters.type

Methods​

load()​

load(params?): this

Defined in: postgres/src/postgrespubsub.service.ts:51

Parameters​

params?​

any = {}

the input parameters

Returns​

this

this

Overrides​

ServiceParameters.load


update()​

update(params, delta): this

Defined in: core/lib/application/parameters.d.ts:21

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

ServiceParameters.update


with()​

with(callback): this

Defined in: core/lib/application/parameters.d.ts:27

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

ServiceParameters.with