-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
Make it possible to configure any TaskExecutor through ChannelRegistration #32081
Comments
Thanks for the suggestion. Things have changed quite a bit since @rstoyanchev I wonder if we couldn't simplify all that and allow the registration of an already-defined task executor so that |
@snicoll, it seems I overlooked this in the changes for 6.1 to enable virtual threads. We need to provide a way to pass an externally prepared |
Avoiding another overloaded |
This commit introduces a new method to configure an existing TaskExecutor in ChannelRegistration. Contrary to TaskExecutorRegistration, a ThreadPoolTaskExecutor is not necessary, and it can't be further configured. This includes the thread name prefix. Closes spring-projectsgh-32081
@uumarov thanks for the report. This is now fixed and I've submitted an issue in Spring Boot to get an update to the auto-configuration. Please watch spring-projects/spring-boot#39314 for updates. |
@snicoll thanks so much 👍 |
Affect: Spring Boot 3.2.2, spring-messaging-6.1.3
Make it possible to set
SimpleAsyncTaskExecutor
for a channel throughChannelRegistration.taskExecutor(taskExecutor)
, not onlyThreadPoolTaskExecutor
, to support Java 21 virtual threads. And it might be worth making the default use ofSimpleAsyncTaskExecutor
as channel's TaskExecutor whenspring.threads.virtual.enabled=true
in Spring Boot 3.2spring-framework/spring-messaging/src/main/java/org/springframework/messaging/simp/config/ChannelRegistration.java
Line 54 in 6bd7f02
The text was updated successfully, but these errors were encountered: