QueueParameters
Class: QueueParameters
Defined in: packages/core/src/queues/queueservice.ts:28
Interface to specify the Service parameters
Extends
Extended by
Constructors
Constructor
new QueueParameters():
QueueParameters
Returns
QueueParameters
Inherited from
Properties
idleDelayer?
optionalidleDelayer?:WaitDelayerDefinition
Defined in: packages/core/src/queues/queueservice.ts:55
Delayer between two receives of the main consumer while the queue returns no message
Queues answering immediately when empty (PostgresQueue, AMQPQueue...) would otherwise be polled in a tight
loop. The delay grows with the consecutive empty receives, up to maxIdleDelay; the time spent in the receive
is deducted, so long-polling queues (SQSQueue, FileQueue, MemoryQueue with a timeout) are not slowed down.
Default
{ "type": "exponential", "interval": 50 }
maxConsumers
maxConsumers:
number=10
Defined in: packages/core/src/queues/queueservice.ts:45
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
maxIdleDelay?
optionalmaxIdleDelay?:number
Defined in: packages/core/src/queues/queueservice.ts:64
Maximum delay between two receives while the queue stays empty, in milliseconds
It bounds the extra latency of the first message after an idle period, and the polling rate of an idle consumer (4 receives per second at 250ms).
Default
250
type
type:
string
Defined in: packages/core/src/services/serviceparameters.ts:10
Type of the service
Inherited from
workerDelayer?
optionalworkerDelayer?:WaitDelayerDefinition
Defined in: packages/core/src/queues/queueservice.ts:32
Delayer between two failed attempts to process messages
workerParallelism
workerParallelism:
boolean=true
Defined in: packages/core/src/queues/queueservice.ts:37
Define if worker should process multi message received in //
Default
true
Methods
load()
load(
params?):this
Defined in: packages/core/src/application/parameters.ts:22
Load raw parameters by assigning them onto this instance
Parameters
params?
any = {}
the service parameters
Returns
this
this for chaining
Inherited from
update()
update(
params?,delta):this
Defined in: packages/core/src/application/parameters.ts:33
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
with()
with(
callback):this
Defined in: packages/core/src/application/parameters.ts:63
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