dbQueue (DB-backed Queue)

A DB-backed queue triggerer executes an orchestration at-least-once, possibly at-most-once (presuming that the orchestration in question has some rollback behaviour) when the given DB queue contains at least one message.

It is a transport asynchronous queue, which is stored in a DB table, so that the queues will survive server shutdown. The data from the queue message itself is provided to the stream.

The queue is a mandatory field.

class names

scala: code.model.flows.processors.queues.DbQueueTriggererFactory
javascript: code_model_flows_processors_queues_DbQueueTriggererFactory

aliases

dbBackedQueue databaseQueue

end type

config

{"categories":[{"defaultCollapsed":true,"fields":["useVirtualThreads","poolSize","sharedPoolName","streamType","mutualReentranceKey","nonReentrant","killOnStop","orchestrationTimeout","orchestratorName","env","isRunning","runOnlyOnHosts","runOnlyOnRanks","runOnlyOnRoles","deepDiagnostics","startupPriority","shouldPinFlows"],"name":"Advanced Run Configuration"}],"fieldName":"dbQueue","fields":[{"default":true,"fieldName":"dbQueue.maintainBatches","hidden":false,"hideLabel":false,"name":"maintainBatches","readonly":false,"renderStrategies":[],"type":"B","validators":[]},{"default":null,"fieldName":"dbQueue.runOnlyOnRanks","hidden":false,"hideLabel":false,"itemType":{"default":null,"fieldName":"dbQueue.runOnlyOnRanks.runOnlyOnRanks","hidden":false,"hideLabel":false,"name":"runOnlyOnRanks","readonly":false,"renderStrategies":[],"type":"I","validators":[]},"name":"runOnlyOnRanks","readonly":false,"renderStrategies":[],"type":"A"},{"default":null,"fieldName":"dbQueue.name","hidden":false,"hideLabel":false,"name":"name","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"canReference":false,"default":0,"fieldName":"dbQueue.delay","hidden":false,"hideLabel":false,"label":"Delay","name":"delay","readonly":false,"renderStrategies":[{"config":{"precision":3,"timeUnit":"ms"},"type":"valueAsTimeSpan"}],"type":"L","validators":[]},{"default":"dbQueue","fieldName":"dbQueue.classPath","hidden":false,"hideLabel":false,"name":"classPath","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"default":null,"fieldName":"dbQueue.bundle","hidden":false,"hideLabel":false,"name":"bundle","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"default":null,"fieldName":"dbQueue.mutualReentrancyKey","hidden":false,"hideLabel":false,"name":"mutualReentrancyKey","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"default":"collecting","fieldName":"dbQueue.streamType","hidden":false,"hideLabel":false,"name":"streamType","readonly":false,"renderStrategies":[],"type":"S","validators":[{"choices":["collecting","eager","forgetful"],"displayOverride":{},"rule":"choices","unenforced":false}]},{"default":false,"fieldName":"dbQueue.deepDiagnostics","hidden":false,"hideLabel":false,"name":"deepDiagnostics","readonly":false,"renderStrategies":[],"type":"B","validators":[]},{"default":null,"fieldName":"dbQueue.runOnlyOnRoles","hidden":false,"hideLabel":false,"itemType":{"default":null,"fieldName":"dbQueue.runOnlyOnRoles.runOnlyOnRoles","hidden":false,"hideLabel":false,"name":"runOnlyOnRoles","readonly":false,"renderStrategies":[],"type":"S","validators":[{"choices":["frontend","backend","viewer"],"displayOverride":{},"rule":"choices","unenforced":false}]},"name":"runOnlyOnRoles","readonly":false,"renderStrategies":[],"type":"A"},{"default":null,"fieldName":"dbQueue.queue","hidden":false,"hideLabel":false,"name":"queue","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"default":"","fieldName":"dbQueue.description","hidden":false,"hideLabel":false,"name":"description","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"bindingHint":"the size of the threadpool. If this is set to a positive number, this trigger will use a dedicated threadpool. If this is set to zero or less, it will use the default shared threadpool.","canReference":true,"default":null,"fieldName":"dbQueue.poolSize","hidden":false,"hideLabel":false,"label":"threadpool size","name":"poolSize","readonly":false,"renderStrategies":[],"type":"I","validators":[]},{"default":false,"fieldName":"dbQueue.nonReentrant","hidden":false,"hideLabel":false,"name":"nonReentrant","readonly":false,"renderStrategies":[],"type":"B","validators":[]},{"default":null,"fieldName":"dbQueue.orchestratorName","hidden":false,"hideLabel":false,"name":"orchestratorName","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"bindingHint":"If this trigger is set to use a dedicated threadpool (using the poolSize attribute), then this name will override which threadpool this trigger uses. By default, triggers using dedicated threadpools will use a threadpool each, but if you set multiple triggers with the same name and pool size, they will share that pool.","canReference":true,"default":null,"fieldName":"dbQueue.sharedPoolName","hidden":false,"hideLabel":false,"label":"shared threadpool","name":"sharedPoolName","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"bindingHint":"Allow Stateful Behaviours to opt out of pinning dependent Flows into memory. By default Flows pinned to memory when referenced by a Stateful Behaviour. This option allows one to override the default behaviour.","default":true,"fieldName":"dbQueue.shouldPinFlows","hidden":false,"hideLabel":false,"name":"shouldPinFlows","readonly":false,"renderStrategies":[],"type":"B","validators":[]},{"default":"${generatedId}","fieldName":"dbQueue.id","hidden":false,"hideLabel":false,"name":"id","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"bindingHint":"This is the order of startup when multiple stateful behaviours are being started at the same time. This is usually when a recipe is being run, or a bundle is being loaded, but is especially relevant when the server is being started.","default":1400,"fieldName":"dbQueue.startupPriority","hidden":false,"hideLabel":false,"name":"startupPriority","readonly":false,"renderStrategies":[],"type":"I","validators":[{"max":2048.0,"min":950.0,"rule":"numberRange"}]},{"default":null,"fieldName":"dbQueue.runOnlyOnHosts","hidden":false,"hideLabel":false,"itemType":{"default":null,"fieldName":"dbQueue.runOnlyOnHosts.runOnlyOnHosts","hidden":false,"hideLabel":false,"name":"runOnlyOnHosts","readonly":false,"renderStrategies":[],"type":"S","validators":[]},"name":"runOnlyOnHosts","readonly":false,"renderStrategies":[],"type":"A"},{"default":false,"fieldName":"dbQueue.isRunning","hidden":false,"hideLabel":false,"name":"isRunning","readonly":false,"renderStrategies":[],"type":"B","validators":[]},{"default":false,"fieldName":"dbQueue.killOnStop","hidden":false,"hideLabel":false,"name":"killOnStop","readonly":false,"renderStrategies":[],"type":"B","validators":[]},{"bindingHint":"If enabled, this trigger will use virtual threads. This confers a substantial performance benefit. When using virtual threads, all threadpool settings are ignored, and one virtual thread per task is automatically created. This is vastly more efficient and performant, with usually significantly lower latency, so this setting should only ever be switched off in very rare circumstances.","canReference":true,"default":true,"fieldName":"dbQueue.useVirtualThreads","hidden":false,"hideLabel":false,"label":"enableVirtualThreads","name":"useVirtualThreads","readonly":false,"renderStrategies":[],"type":"B","validators":[]},{"canReference":false,"default":180000,"fieldName":"dbQueue.orchestrationTimeout","hidden":false,"hideLabel":false,"label":"Orchestration Timeout","name":"orchestrationTimeout","readonly":false,"renderStrategies":[{"config":{"precision":3,"timeUnit":"ms"},"type":"valueAsTimeSpan"}],"type":"L","validators":[]},{"default":"statefulBehaviour","fieldName":"dbQueue.type","hidden":false,"hideLabel":false,"name":"type","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"default":true,"fieldName":"dbQueue.implicitAck","hidden":false,"hideLabel":false,"name":"implicitAck","readonly":false,"renderStrategies":[],"type":"B","validators":[]},{"default":1,"fieldName":"dbQueue.maximumBatchSize","hidden":false,"hideLabel":false,"name":"maximumBatchSize","readonly":false,"renderStrategies":[],"type":"I","validators":[]},{"default":null,"fieldName":"dbQueue.env","hidden":false,"hideLabel":false,"name":"env","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"canReference":false,"default":30000,"fieldName":"dbQueue.pollInterval","hidden":false,"hideLabel":false,"label":"Poll Interval","name":"pollInterval","readonly":false,"renderStrategies":[{"config":{"precision":3,"timeUnit":"ms"},"type":"valueAsTimeSpan"}],"type":"L","validators":[]}],"hidden":false,"hideLabel":false,"label":"Triggerer Configuration","name":"dbQueue","readonly":false,"renderStrategies":[],"type":"O"}