Class EsbTrigger
java.lang.Object
com.kingsrook.qqq.esb.model.EsbTrigger
A trigger that runs a process from messages on an ESB queue or topic.
A trigger doesn't know its process's name (it lives in the process's
EsbProcessMetaData), so the derived names take it as a parameter:
- name: processName.destinationName (the QQQ destination name).
- subscriptionName (topics only): defaults to processName.X, where X is the
destination's broker-side name (QEsbDestinationMetaData
getEffectiveDestinationName).
- deadLetterDestinationName: defaults to X.dlq for a queue, or
X.subscriptionName.dlq for a topic (X again being the broker-side name).
The subscription and dead-letter names are names on the broker. When the
destination has no separate broker-side name, X is its QQQ name, and the
default subscription name is the same as the trigger's name.
Other defaults are per spec section 3. batchSize and batchWaitMs are left
unset unless given (so validation can reject them in SINGLE mode); use
getEffectiveBatchSize and getEffectiveBatchWaitMs for their values.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for batchSize (null unless set).Getter for batchWaitMs (null unless set).Getter for concurrencyGetter for deadLetterDestinationName.Getter for destinationNamebatchSize if set, else the default (100).batchWaitMs if set, else the default (1000).getEffectiveDeadLetterDestinationName(String processName) The dead-letter destination (broker queue) name: deadLetterDestinationName if set, else the default for this trigger's destination, which is looked up in the ESB meta-data of the QContext's instance (so, on a thread of your own, call this after QContext.init, or use the overload that takes the destination).getEffectiveDeadLetterDestinationName(String processName, QEsbDestinationMetaData destination) The dead-letter destination (broker queue) name, given this trigger's destination: deadLetterDestinationName if set, else X.dlq for a queue, or X.effectiveSubscriptionName.dlq for a topic, where X is the destination's broker-side name.getEffectiveSubscriptionName(String processName) The shared durable subscription name (topic triggers): subscriptionName if set, else processName.X, where X is the broker-side name of this trigger's destination, which is looked up in the ESB meta-data of the QContext's instance (so, on a thread of your own, call this after QContext.init, or use the overload that takes the destination).getEffectiveSubscriptionName(String processName, QEsbDestinationMetaData destination) The shared durable subscription name (topic triggers), given this trigger's destination: subscriptionName if set, else processName.X, where X is the destination's broker-side name.Getter for maxAttemptsgetMode()Getter for modeThe trigger's name: processName.destinationNameGetter for onDeadLetterGetter for retryDelayMsGetter for retryMaxDelayMsGetter for retryMultiplierGetter for runAsSessionSupplier - a Supplier; null means the system user session. Getter for startPausedGetter for subscriptionName.Getter for timeoutMs (per run; null means no timeout)voidsetBatchSize(Integer batchSize) Setter for batchSizevoidsetBatchWaitMs(Integer batchWaitMs) Setter for batchWaitMsvoidsetConcurrency(Integer concurrency) Setter for concurrencyvoidsetDeadLetterDestinationName(String deadLetterDestinationName) Setter for deadLetterDestinationNamevoidsetDestinationName(String destinationName) Setter for destinationNamevoidsetMaxAttempts(Integer maxAttempts) Setter for maxAttemptsvoidsetMode(EsbTriggerMode mode) Setter for modevoidsetOnDeadLetter(EsbDeadLetterAction onDeadLetter) Setter for onDeadLettervoidsetRetryDelayMs(Integer retryDelayMs) Setter for retryDelayMsvoidsetRetryMaxDelayMs(Integer retryMaxDelayMs) Setter for retryMaxDelayMsvoidsetRetryMultiplier(Double retryMultiplier) Setter for retryMultipliervoidsetRunAsSessionSupplier(QCodeReference runAsSessionSupplier) Setter for runAsSessionSuppliervoidsetStartPaused(Boolean startPaused) Setter for startPausedvoidsetSubscriptionName(String subscriptionName) Setter for subscriptionNamevoidsetTimeoutMs(Integer timeoutMs) Setter for timeoutMswithBatchSize(Integer batchSize) Fluent setter for batchSizewithBatchWaitMs(Integer batchWaitMs) Fluent setter for batchWaitMswithConcurrency(Integer concurrency) Fluent setter for concurrencywithDeadLetterDestinationName(String deadLetterDestinationName) Fluent setter for deadLetterDestinationNamewithDestinationName(String destinationName) Fluent setter for destinationNamewithMaxAttempts(Integer maxAttempts) Fluent setter for maxAttemptswithMode(EsbTriggerMode mode) Fluent setter for modewithOnDeadLetter(EsbDeadLetterAction onDeadLetter) Fluent setter for onDeadLetterwithRetryDelayMs(Integer retryDelayMs) Fluent setter for retryDelayMswithRetryMaxDelayMs(Integer retryMaxDelayMs) Fluent setter for retryMaxDelayMswithRetryMultiplier(Double retryMultiplier) Fluent setter for retryMultiplierwithRunAsSessionSupplier(QCodeReference runAsSessionSupplier) Fluent setter for runAsSessionSupplierwithStartPaused(Boolean startPaused) Fluent setter for startPausedwithSubscriptionName(String subscriptionName) Fluent setter for subscriptionNamewithTimeoutMs(Integer timeoutMs) Fluent setter for timeoutMs
-
Field Details
-
DEFAULT_BATCH_SIZE
-
DEFAULT_BATCH_WAIT_MS
-
-
Constructor Details
-
EsbTrigger
public EsbTrigger()
-
-
Method Details
-
getName
-
getEffectiveSubscriptionName
The shared durable subscription name (topic triggers): subscriptionName if set, else processName.X, where X is the broker-side name of this trigger's destination, which is looked up in the ESB meta-data of the QContext's instance (so, on a thread of your own, call this after QContext.init, or use the overload that takes the destination). Throws QRuntimeException if a default is needed but the destination can't be found there. -
getEffectiveSubscriptionName
The shared durable subscription name (topic triggers), given this trigger's destination: subscriptionName if set, else processName.X, where X is the destination's broker-side name. -
getEffectiveDeadLetterDestinationName
The dead-letter destination (broker queue) name: deadLetterDestinationName if set, else the default for this trigger's destination, which is looked up in the ESB meta-data of the QContext's instance (so, on a thread of your own, call this after QContext.init, or use the overload that takes the destination). Throws QRuntimeException if a default is needed but the destination can't be found there. -
getEffectiveDeadLetterDestinationName
public String getEffectiveDeadLetterDestinationName(String processName, QEsbDestinationMetaData destination) The dead-letter destination (broker queue) name, given this trigger's destination: deadLetterDestinationName if set, else X.dlq for a queue, or X.effectiveSubscriptionName.dlq for a topic, where X is the destination's broker-side name. -
getEffectiveBatchSize
batchSize if set, else the default (100). -
getEffectiveBatchWaitMs
batchWaitMs if set, else the default (1000). -
getDestinationName
Getter for destinationName -
setDestinationName
Setter for destinationName -
withDestinationName
Fluent setter for destinationName -
getSubscriptionName
Getter for subscriptionName. See also getEffectiveSubscriptionName. -
setSubscriptionName
Setter for subscriptionName -
withSubscriptionName
Fluent setter for subscriptionName -
getMode
Getter for mode -
setMode
Setter for mode -
withMode
Fluent setter for mode -
getBatchSize
Getter for batchSize (null unless set). See also getEffectiveBatchSize. -
setBatchSize
Setter for batchSize -
withBatchSize
Fluent setter for batchSize -
getBatchWaitMs
Getter for batchWaitMs (null unless set). See also getEffectiveBatchWaitMs. -
setBatchWaitMs
Setter for batchWaitMs -
withBatchWaitMs
Fluent setter for batchWaitMs -
getConcurrency
Getter for concurrency -
setConcurrency
Setter for concurrency -
withConcurrency
Fluent setter for concurrency -
getMaxAttempts
Getter for maxAttempts -
setMaxAttempts
Setter for maxAttempts -
withMaxAttempts
Fluent setter for maxAttempts -
getRetryDelayMs
Getter for retryDelayMs -
setRetryDelayMs
Setter for retryDelayMs -
withRetryDelayMs
Fluent setter for retryDelayMs -
getRetryMultiplier
Getter for retryMultiplier -
setRetryMultiplier
Setter for retryMultiplier -
withRetryMultiplier
Fluent setter for retryMultiplier -
getRetryMaxDelayMs
Getter for retryMaxDelayMs -
setRetryMaxDelayMs
Setter for retryMaxDelayMs -
withRetryMaxDelayMs
Fluent setter for retryMaxDelayMs -
getOnDeadLetter
Getter for onDeadLetter -
setOnDeadLetter
Setter for onDeadLetter -
withOnDeadLetter
Fluent setter for onDeadLetter -
getDeadLetterDestinationName
Getter for deadLetterDestinationName. See also getEffectiveDeadLetterDestinationName. -
setDeadLetterDestinationName
Setter for deadLetterDestinationName -
withDeadLetterDestinationName
Fluent setter for deadLetterDestinationName -
getRunAsSessionSupplier
Getter for runAsSessionSupplier - a Supplier; null means the system user session. -
setRunAsSessionSupplier
Setter for runAsSessionSupplier -
withRunAsSessionSupplier
Fluent setter for runAsSessionSupplier -
getTimeoutMs
Getter for timeoutMs (per run; null means no timeout) -
setTimeoutMs
Setter for timeoutMs -
withTimeoutMs
Fluent setter for timeoutMs -
getStartPaused
Getter for startPaused -
setStartPaused
Setter for startPaused -
withStartPaused
Fluent setter for startPaused
-