0
votes

I am using an annotation-based event listener which I have also tagged as @Async. (See Asynchronous Listeners).

Which TaskExecutor implementation is Spring using to serve these requests? The documentation reads:

By default, when specifying @Async on a method, the executor that is used is the one configured when enabling async support, i.e. the “annotation-driven” element if you are using XML or your AsyncConfigurer implementation, if any.

The problem is that I haven't done any configuration for this at all, so I am not sure what my AsyncConfigurer implementation is to begin with.

My guess is that we're dealing a SimpleAsyncTaskExecutor.

1

1 Answers

0
votes

I found the answer in the documentation for EnableAsync:

By default, Spring will be searching for an associated thread pool definition: either a unique TaskExecutor bean in the context, or an Executor bean named "taskExecutor" otherwise. If neither of the two is resolvable, a SimpleAsyncTaskExecutor will be used to process async method invocations.

So, it's the SimpleAsyncTaskExecutor.