Custom Sling AEM Job : How Do I work with retry a job
Hi Team ,
I am working with AEM sling job , and have a situation when a job fails. how do I retry.
where do I set the count .. default is 0.
try {
ResourceResolver resourceResolver = utilityService.getResourceResolver();
String topic = job.getTopic();
LOGGER.info("Consuming job of topic: {}", topic);
performCustomJob(eventPath,resourceResolver);
} catch (Exception e) {
LOGGER.info("ERROR -- JOB RESULT IS FAILURE {}",e.getMessage());
result = JobResult.FAILED;
//when the job is failed I need to retry the same step -> this How should I do.
}
How do i achieve it