FileQueueParameters
Class: FileQueueParameters
Defined in: fs/src/filequeue.service.ts:9
Configuration parameters for the filesystem-backed FIFO queue.
Extends
QueueParameters
Constructors
Constructor
new FileQueueParameters():
FileQueueParameters
Returns
FileQueueParameters
Inherited from
QueueParameters.constructor
Properties
expire
expire:
number
Defined in: fs/src/filequeue.service.ts:15
Number of seconds before dropping message
Default
30
folder
folder:
string
Defined in: fs/src/filequeue.service.ts:19
Where to store the queue
idleDelayer?
optionalidleDelayer?:WaitDelayerDefinition
Defined in: core/lib/queues/queueservice.d.ts:47
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 }
Inherited from
QueueParameters.idleDelayer
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
maxIdleDelay?
optionalmaxIdleDelay?:number
Defined in: core/lib/queues/queueservice.d.ts:56
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
Inherited from
QueueParameters.maxIdleDelay
pollInterval?
optionalpollInterval?:number
Defined in: fs/src/filequeue.service.ts:34
Interval between two checks of the folder while waiting for a message, in milliseconds
Default
100
timeout?
optionaltimeout?:number
Defined in: fs/src/filequeue.service.ts:28
Number of seconds to wait for a message when the queue is empty, before returning no message
A message sent by this service ends the wait immediately; messages written by other processes are picked up
within pollInterval.
Default
10
type
type:
string
Defined in: core/lib/services/serviceparameters.d.ts:9
Type of the service
Inherited from
QueueParameters.type
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
default()
default():
void
Defined in: fs/src/filequeue.service.ts:50
Set default expiration to 30 seconds and convert to milliseconds.
Returns
void
load()
load(
params?):this
Defined in: fs/src/filequeue.service.ts:41
Load parameters with expiration in seconds.
Parameters
params?
any = {}
raw parameters
Returns
this
this instance
Overrides
QueueParameters.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
QueueParameters.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
QueueParameters.with