Change thread pool timing

Hi,

I have integrated Camunda into spring boot application.
I have a TimerCatchingEvent which is set to PT2M, 2 minutes. But the service task after the timercatching event doesn’t gets triggered exactly after 2 minutes. It takes around 2 minutes and 20-30 seconds extra.
My application is very critical when considering time and can’t afford to have to those extra 20-30 seconds.

How can i change the task executor timing configuration?

Help is much appreciated.

Thanks

I have done below but still no luck

@Configuration
public class CamundaConfiguration {

@Bean
public TaskExecutor camundaTaskExecutor() {

    final ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();

    threadPoolTaskExecutor.setCorePoolSize(5);
    threadPoolTaskExecutor.setMaxPoolSize(20);
    threadPoolTaskExecutor.setKeepAliveSeconds(5);

    return threadPoolTaskExecutor;
}

}

Hi @ash6892,

most probably the wait time between job acquisitions is too long because of low amount of jobs to do.

You can contol the wait time between job acquisitions with camunda.bpm.job-execution.max-wait: 5000 or less. Have a look at the configuration options for spring boot: https://docs.camunda.org/manual/7.12/user-guide/spring-boot-integration/configuration/#camunda-engine-properties and the backgroud of job execution: https://docs.camunda.org/manual/7.12/user-guide/process-engine/the-job-executor/#job-acquisition. You can find all job acquisition configurations at: https://docs.camunda.org/manual/7.12/reference/deployment-descriptors/tags/job-executor/#job-acquisition-configuration-properties

Hope this helps, Ingo