Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

Anyone know this OtherTransaction/Java/org.apache.sling.event.impl.jobs.queues.JobQueueImpl/startJob ?

Avatar

Level 1

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:

 

  1. What is this startJob intended to do?

  2. What processes or operations does it initiate?

  3. Are there any documentation or references that explain its usage and expected behavior?

     

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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):

  1. 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).

  2. Marks the Job as Active
    Updates job state from QUEUED to ACTIVE so no other node/thread will take it.

  3. Dispatches to a JobConsumer
    Finds the right JobConsumer based on the job’s topic (eg. com/adobe/granite/workflow/offloading).

  4. Executes Job Logic
    Calls JobConsumer.process(Job) which runs whatever logic is registered for that topic.

  5. 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:

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


Santosh Sai

AEM BlogsLinkedIn


View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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):

  1. 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).

  2. Marks the Job as Active
    Updates job state from QUEUED to ACTIVE so no other node/thread will take it.

  3. Dispatches to a JobConsumer
    Finds the right JobConsumer based on the job’s topic (eg. com/adobe/granite/workflow/offloading).

  4. Executes Job Logic
    Calls JobConsumer.process(Job) which runs whatever logic is registered for that topic.

  5. 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:

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


Santosh Sai

AEM BlogsLinkedIn