Description
Bozhidar Bozhanov opened SPR-9318 and commented
Currently all @Async
methods are executed using the same thread pool. But often you need different groups of related async operations and you don't want them to share the same pool. For example, a scheduled job may want to asynchronously invoke a method multiple times, but if it uses @Async
it will consume all the threads that are supposed to be used by other processes.
That's why I suggest to add an async group. @Async
(group="main"), @Async
(group="calculations"), etc. Each of them will have a separate pool.
<task:executor id="mainExecutor" pool-size="100" group="main" />
<task:executor id="calcExecutor" pool-size="20" group="calculations" />
<task:annotation-driven executors="mainExecutor,calcExecutor" /> (or a nested <list>)
Affects: 3.1.1
Issue Links:
- Enable Executor qualification with @Async [SPR-6847] #11513 Enable Executor qualification with
@Async
("duplicates")
1 votes, 1 watchers