Camunda Spring Boot configuration Job Executor Configuration related to queueSize

Dear Sir,

We are using camunda spring boot 2.0.0 with tomcat as embedded server (in spring boot).

https://docs.camunda.org/manual/7.8/reference/deployment-descriptors/tags/job-executor/

How do we set below variables to job executor?

<properties>
    <!-- Note: the following properties only take effect in a Tomcat environment -->
    <property name="queueSize">3</property>
    <property name="corePoolSize">5</property>
    <property name="maxPoolSize">10</property>
    <property name="keepAliveTime">0</property>
  </properties>
</job-executor>

Need your help?

If the yaml configuration properties are not sufficient, you can always fall back to custom bean implementation.
In your case, check `DefaultJobConfiguration.JobConfiguration#camundaTaskExecutor``

This is the default implementing bean that allows some settings via yaml. You can disable that bean by providing a custom implementation that configures the taskExecutor as desired.

so somewhere in your configuration do

@Bean
@Qualifier("camundaTaskExecutor")
public TaskExecutor myTaskExecutor() {

    final ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();

      threadPoolTaskExecutor.setCorePoolSize(corePoolSize);
      threadPoolTaskExecutor.setMaxPoolSize(maxPoolSize);
// ... other properties

   return threadPoolTaskExecutor;
}

2 Likes

Thanks jangalinski for quick response.