Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 1
Level 1
arunaaems506124
Level 1

Like

1 like

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
arunaaems506124
Level 1

Like

1 like

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Applaud 5
View profile
arunaaems506124
Level 1

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

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,428 likes

Total Posts

3,300 posts

Correct Reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,428 likes

Total Posts

3,300 posts

Correct Reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
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.

Avatar

Avatar
Validate 1
Level 1
arunaaems506124
Level 1

Like

1 like

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
arunaaems506124
Level 1

Like

1 like

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Applaud 5
View profile
arunaaems506124
Level 1

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?

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,428 likes

Total Posts

3,300 posts

Correct Reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,428 likes

Total Posts

3,300 posts

Correct Reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
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.

Avatar

Avatar
Validate 1
Level 1
arunaaems506124
Level 1

Like

1 like

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
arunaaems506124
Level 1

Like

1 like

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Applaud 5
View profile
arunaaems506124
Level 1

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

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,428 likes

Total Posts

3,300 posts

Correct Reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,428 likes

Total Posts

3,300 posts

Correct Reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

22-04-2020

You need to write an event listener and onEvent method write a logic using thread.