spring-modulith
spring-modulith copied to clipboard
Use dedicated task executor for `@ApplicationModuleListener`s
@ApplicationModuleListeners need dedicated control over the Executor running them, for example, to enable tracing context propagation in the observability module. To contain the impact of such a customization, it makes sense to use a dedicated Executor.
Implementation considerations
- Register a dedicated
ThreadPoolTaskExecutor/SimpleAsyncTaskExecutorwith a dedicated name and refer to that from the@Asyncannotation on@ApplicationModuleListener(@ConditionalOnThreading,@ConditionalOnMissingBean)
References
- GH-637
Will it be possible to configure the Executor or extend its functionality? Our application configures a custom TaskDecorator. Currently, we use a custom aspect to get the same functionality for @ApplicationModuleListener.
Yes, you'll be able to override the bean by name. Or use a BeanPostProcessor to find and customize it.
Hi team,
Hope you're doing well.
I'm just checking in on this issue regarding the dedicated task executor for @ApplicationModuleListeners. Being able to configure this executor would be very helpful for managing listener concurrency and integrating with observability tools in my application.
I was wondering if there have been any updates on the progress for this enhancement, or if it might be tentatively planned for a future release milestone?
I am also willing to contribute to implementing these changes if the team is open to external contributions in these areas.