Configuring the Scheduled Task Thread Pool
Tasks executed by @Scheduled
are run by default on a ScheduledExecutorService configured to have twice the number of threads as available processors.
You can configure this thread pool using application.yml
, for example:
Configuring Scheduled Task Thread Pool
micronaut:
executors:
scheduled:
type: scheduled
core-pool-size: 30
Property | Type | Description |
---|---|---|
| java.lang.Integer | |
| ||
| java.lang.Integer | |
| java.lang.Integer | |
| java.lang.Class | |
| java.lang.String | Sets the executor name. |
| java.lang.Integer | Sets the number of threads for FIXED. Default value (2 Number of processors available to the Java virtual machine). |