Highlighted

How to configure OSGI sling jobs to parallel running with custom job consumer.

arunaaems506124

12-04-2020

Hi All,

 

I am creating a utility to imports assets from FTP to AEm DAm server. For that I have used jobmanager.addJob("TOPICS","HASHMAP"); My job triggering withexact topic info and importing assets into AEM DAM Server.

 

To implement parallel execution of job Do I need to do anything apart from Apache Sling Job Queue configuration? If Yes then how to take care as there is not much documnetation on the Adobe documentation.

 

If any one implemented parallel jobs execution please provide inputs.

 

1. How to implement parallel execution of jobs. how to confirm that jobs executing parallelly by updating Apache Sling job Queue OSGI Configuration in AEM.

2. When Job is trigered it automatically processing JobResults and stopping reqest from there itselft.How to redirect request from JobConsumer to Osgi Service.

 

Thanks,

Aruna

Replies

Highlighted

Arun_Patidar

MVP

13-04-2020

Hi,

You don't need to do anything to configure parallel job execution.

You just have to take care of parallel execution in your business logic, I meant multithreading.

Highlighted

arunaaems506124

13-04-2020

Thanks Arun for the reply. 

 

I need some more details on parallel execution. Multi threading means Java multi threading correct.

Is parallel streams work?

Highlighted

Arun_Patidar

MVP

19-04-2020

Hi, Yes, you can use java multithreading. The sling jobs run parallel based on time or events etc. Just make sure one 2 same job should not work on 1 item at the same time.
Highlighted

arunaaems506124

21-04-2020

Thans for the inputs.

 

I would like to understand how to configure sling jobs to execute parallelly on some event?

Is there any documentation? Please help me in understanding more about it?

 

Thanks,

Aruna