03-07-2021 04:01 AM
Hi!
I have several parallel long-duration tasks executing in separate transactions and them eate all the memory. I need to organize a queue to run them serially, please tell me how to do it properly? Should I create a Scheduled job which listern for somkind of queue, or what?
thank you!
03-08-2021 10:41 AM
Yes, you can make use of scheduled jobs which can process the job queue either one by one or in batches depending on your infrastructure setup.
There are two ways you can setup queuing mechanism:
1- Make use of ActiveMQ
2- Use repository based job queue (basically creating contentless nodes which job data in the repository, process them and delete/retain (for reporting) after job is processed)
Here is an example of creating scheduled jobs:
https://javaworld-abhinav.blogspot.com/2015/08/creating-scheduled-job-in-alfresco.html
https://docs.alfresco.com/content-services/6.1/develop/repo-ext-points/scheduled-jobs/
Explore our Alfresco products with the links below. Use labels to filter content by product module.