Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dedicated task executor for @ApplicationModuleListeners #641

Open
odrotbohm opened this issue May 24, 2024 · 2 comments
Open

Use dedicated task executor for @ApplicationModuleListeners #641

odrotbohm opened this issue May 24, 2024 · 2 comments
Labels
in: event publication registry Event publication registry type: enhancement Major enhanvements, new features

Comments

@odrotbohm
Copy link
Member

@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/SimpleAsyncTaskExecutor with a dedicated name and refer to that from the @Async annotation on @ApplicationModuleListener (@ConditionalOnThreading, @ConditionalOnMissingBean)

References

@odrotbohm odrotbohm added in: event publication registry Event publication registry type: enhancement Major enhanvements, new features labels May 24, 2024
@danstooamerican
Copy link

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.

@odrotbohm
Copy link
Member Author

Yes, you'll be able to override the bean by name. Or use a BeanPostProcessor to find and customize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: event publication registry Event publication registry type: enhancement Major enhanvements, new features
Projects
None yet
Development

No branches or pull requests

2 participants