I'm currently investigating transactions originating from:
OtherTransaction/Java/org.apache.sling.event.impl.jobs.queues.JobQueueImpl/startJob
These are coming from my AEM publishers, and I would like to understanding this startJob function within the aem. Specifically, I need clarification on the following:
What is this startJob intended to do?
What processes or operations does it initiate?
Are there any documentation or references that explain its usage and expected behavior?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Jade_WensylFa,
This sits inside Sling’s Eventing & Job Handling framework, which AEM builds on top of for background work like DAM workflows, async page replications, etc.
What is startJob() intended to do?
startJob() is the method that actually begins processing a queued job in Sling’s job handling system.
It’s not a generic “application transaction” - it’s the low-level point where Sling decides:
A job is available in a queue.
A worker thread can take it.
It will hand the job over to the registered JobConsumer that knows how to process it.
Think of it as:
Queue Manager → Dispatcher → Worker Thread.
In AEM, this is the mechanism that runs background tasks like:
Workflow steps
Asset rendition generation
Replication agents in async mode
Maintenance jobs (oak indexing, version purge)
Custom jobs you define via the Sling API
What processes or operations does it initiate?
When startJob() is called, this happens (simplified flow):
Dequeues a Job
It pulls the next available job from the queue storage (could be in-memory or persisted in the JCR under /var/eventing/jobs).
Marks the Job as Active
Updates job state from QUEUED to ACTIVE so no other node/thread will take it.
Dispatches to a JobConsumer
Finds the right JobConsumer based on the job’s topic (eg. com/adobe/granite/workflow/offloading).
Executes Job Logic
Calls JobConsumer.process(Job) which runs whatever logic is registered for that topic.
Updates Job State
On completion, marks it as SUCCEEDED, FAILED, or reschedules it if retries are needed.
Documentation & References
Unfortunately, startJob() is an internal method, so Adobe’s public docs don’t cover it directly.
You’ll want to look at:
Apache Sling Job Handling Docs
https://sling.apache.org/documentation/bundles/apache-sling-eventing-and-job-handling.html
Sling JobQueueImpl Source Code (see startJob implementation)
https://github.com/apache/sling-org-apache-sling-event/blob/master/src/main/java/org/apache/sling/ev...
(Method name and behavior are stable, though exact code depends on Sling version.)
Adobe AEM Docs on Async Processing (relevant for what jobs might be triggered)
https://experienceleague.adobe.com/en/docs/experience-manager-65/content/sites/administering/introdu...
Why you’re seeing it on Publishers
On publishers, you might see startJob() triggered by:
Replication receive jobs (incoming packages from Author)
Workflow offloading (if enabled)
Sling resource event listeners (eg. cache invalidation jobs)
Custom project jobs if your code uses JobManager.addJob(...)
If you want to know exactly which jobs are triggering it, you can:
Enable DEBUG logging for org.apache.sling.event.impl
Inspect /var/eventing/jobs in CRXDE or via Sling console
Check topic properties of jobs to map them to their consumer
Hi @Jade_WensylFa,
This sits inside Sling’s Eventing & Job Handling framework, which AEM builds on top of for background work like DAM workflows, async page replications, etc.
What is startJob() intended to do?
startJob() is the method that actually begins processing a queued job in Sling’s job handling system.
It’s not a generic “application transaction” - it’s the low-level point where Sling decides:
A job is available in a queue.
A worker thread can take it.
It will hand the job over to the registered JobConsumer that knows how to process it.
Think of it as:
Queue Manager → Dispatcher → Worker Thread.
In AEM, this is the mechanism that runs background tasks like:
Workflow steps
Asset rendition generation
Replication agents in async mode
Maintenance jobs (oak indexing, version purge)
Custom jobs you define via the Sling API
What processes or operations does it initiate?
When startJob() is called, this happens (simplified flow):
Dequeues a Job
It pulls the next available job from the queue storage (could be in-memory or persisted in the JCR under /var/eventing/jobs).
Marks the Job as Active
Updates job state from QUEUED to ACTIVE so no other node/thread will take it.
Dispatches to a JobConsumer
Finds the right JobConsumer based on the job’s topic (eg. com/adobe/granite/workflow/offloading).
Executes Job Logic
Calls JobConsumer.process(Job) which runs whatever logic is registered for that topic.
Updates Job State
On completion, marks it as SUCCEEDED, FAILED, or reschedules it if retries are needed.
Documentation & References
Unfortunately, startJob() is an internal method, so Adobe’s public docs don’t cover it directly.
You’ll want to look at:
Apache Sling Job Handling Docs
https://sling.apache.org/documentation/bundles/apache-sling-eventing-and-job-handling.html
Sling JobQueueImpl Source Code (see startJob implementation)
https://github.com/apache/sling-org-apache-sling-event/blob/master/src/main/java/org/apache/sling/ev...
(Method name and behavior are stable, though exact code depends on Sling version.)
Adobe AEM Docs on Async Processing (relevant for what jobs might be triggered)
https://experienceleague.adobe.com/en/docs/experience-manager-65/content/sites/administering/introdu...
Why you’re seeing it on Publishers
On publishers, you might see startJob() triggered by:
Replication receive jobs (incoming packages from Author)
Workflow offloading (if enabled)
Sling resource event listeners (eg. cache invalidation jobs)
Custom project jobs if your code uses JobManager.addJob(...)
If you want to know exactly which jobs are triggering it, you can:
Enable DEBUG logging for org.apache.sling.event.impl
Inspect /var/eventing/jobs in CRXDE or via Sling console
Check topic properties of jobs to map them to their consumer