Skip to main content

PostgresPubSubParameters

@webda/postgres


Class: PostgresPubSubParameters

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

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:27

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:32

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


reconnectDelay?​

optional reconnectDelay?: number

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

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:8

Type of the service

Inherited from​

ServiceParameters.type

Methods​

load()​

load(params?): this

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

Parameters​

params?​

any = {}

the input parameters

Returns​

this

this

Overrides​

ServiceParameters.load


update()​

update(params, delta): this

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

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/services/serviceparameters.d.ts:31

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