For the complete documentation index, see llms.txt. This page is also available as Markdown.

Interceptors

Interception Points

cbq announces the following interception points:

onCBQJobAdded

This is called when a Job is dispatched to a Queue.

onCBQJobMarshalled

This is called when a Job is pulled off the Queue to work.

onCBQJobComplete

This is called when a Job successfully finishes executing.

onCBQJobException

This is called when encountering an exception when handling a Job.

onCBQJobFailed

This is called when a Job is considered failed, after exhausting its maxAttempts.

Queue observation hooks (7.0.1+)

The observation hooks added in 7.0.1 are onCBQJobPublished, onCBQJobPublishException, onCBQJobAttemptScheduled, onCBQJobAttemptFinished, onCBQJobExecutionStarted, and onCBQJobExecutionExited. See Queue Observability for availability, payloads, statuses, worker-thread context, timeout handling, and observer diagnostics. These hooks do not change the contracts of the existing points above.

JobPattern Annotation

Interceptors listening on the cbq interception points listed above can optionally restrict execution to certain Jobs using a jobPattern annotation (similar to the eventPattern annotation in ColdBox).

This annotation accepts a regex string to check against the Job full name:

Jobs that do not match the interception point will send a notice to the debug log, if that is turned on for JobInterceptorRestriction.

Last updated