PostgresQueueParameters
Class: PostgresQueueParameters
Defined in: postgres/src/postgresqueue.service.ts:10
Configuration for PostgresQueueService.
Extends
QueueParameters
Constructors
Constructor
new PostgresQueueParameters():
PostgresQueueParameters
Returns
PostgresQueueParameters
Inherited from
QueueParameters.constructor
Properties
autoCreateTable?
optionalautoCreateTable?:boolean
Defined in: postgres/src/postgresqueue.service.ts:56
Whether to auto-create the queue table on init.
Default
true
batchSize?
optionalbatchSize?:number
Defined in: postgres/src/postgresqueue.service.ts:38
Max number of messages pulled per receiveMessage call. The queue
worker calls receiveMessage in a loop, so this is also the parallel
batch size.
Default
10
maxConsumers
maxConsumers:
number
Defined in: core/lib/queues/queueservice.d.ts:37
Max number of queue consumers Queue will auto increase to this max number if queue is loaded and it will decrease to just one consumer if no messages are available
Default
10
Inherited from
QueueParameters.maxConsumers
postgresqlServer?
optionalpostgresqlServer?:ClientConfig|PoolConfig
Defined in: postgres/src/postgresqueue.service.ts:50
Connection settings forwarded to the chosen pg client/pool. Defaults to PG* environment variables.
table?
optionaltable?:string
Defined in: postgres/src/postgresqueue.service.ts:21
Table name backing the queue. Auto-created on init if missing.
Default
"webda_queue"
Pattern
/^[a-zA-Z_][a-zA-Z0-9_]*$/
Examples
"myapp_queue"
"user_notifications"
"cache_invalidation"
"orders"
type
type:
string
Defined in: core/lib/services/serviceparameters.d.ts:8
Type of the service
Inherited from
QueueParameters.type
usePool?
optionalusePool?:boolean
Defined in: postgres/src/postgresqueue.service.ts:45
Whether to use a pg.Pool (recommended for shared workloads) or a
single pg.Client.
Default
true
visibilityTimeout?
optionalvisibilityTimeout?:number
Defined in: postgres/src/postgresqueue.service.ts:30
Visibility timeout in seconds — how long a locked-but-undeleted message stays invisible to other consumers before being eligible for redelivery. Workers that crash mid-process without acking will see their messages reappear after this window.
Default
30
workerDelayer?
optionalworkerDelayer?:WaitDelayerDefinition
Defined in: core/lib/queues/queueservice.d.ts:24
Delayer between two failed attempts to process messages
Inherited from
QueueParameters.workerDelayer
workerParallelism
workerParallelism:
boolean
Defined in: core/lib/queues/queueservice.d.ts:29
Define if worker should process multi message received in //
Default
true
Inherited from
QueueParameters.workerParallelism
Methods
load()
load(
params?):this
Defined in: postgres/src/postgresqueue.service.ts:63
Parameters
params?
any = {}
the input parameters
Returns
this
this
Overrides
QueueParameters.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
QueueParameters.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
QueueParameters.with