How can I use multithreading concept in AEM? | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by h_kataria

You might want to check https://sling.apache.org/documentation/bundles/apache-sling-commons-thread-pool.html 
In past sling scheduler has been the most common use case  https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html 
And ff you need processing gurantee (especiallly if you are working with AEM as cloud), then you might want to take a look at Sling Jobs https://sling.apache.org/documentation/bundles/apache-sling-eventing-and-job-handling.html#jobs-guarantee-of-processing 
Hope this helps.

4 replies

gkalyan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 15, 2024

@kous1992 

Do you have a specific use case you are looking into?

 

You can check this blog post from Dan about concurrency pitfalls(this is an old blog post but I think it is still relevant) 

https://blogs.perficient.com/2017/12/05/2-common-concurrency-pitfalls-in-aem-and-how-to-avoid-them/

h_kataria
Community Advisor
h_katariaCommunity AdvisorAccepted solution
Community Advisor
June 16, 2024

You might want to check https://sling.apache.org/documentation/bundles/apache-sling-commons-thread-pool.html 
In past sling scheduler has been the most common use case  https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html 
And ff you need processing gurantee (especiallly if you are working with AEM as cloud), then you might want to take a look at Sling Jobs https://sling.apache.org/documentation/bundles/apache-sling-eventing-and-job-handling.html#jobs-guarantee-of-processing 
Hope this helps.

kautuk_sahni
Community Manager
Community Manager
June 19, 2024

@kous1992 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni