Skip to content

Use dedicated task executor for @ApplicationModuleListeners #641

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

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

Use dedicated task executor for @ApplicationModuleListeners #641

odrotbohm opened this issue May 24, 2024 · 3 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.

@michalkopacz
Copy link

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.

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

3 participants