Skip to content

Fix issue autowiring channelExecutors and taskScheduler in spring messaging & websocket#28719

Closed
CodeInDreams wants to merge 1 commit into
spring-projects:mainfrom
CodeInDreams:fix-executors-autowiring
Closed

Fix issue autowiring channelExecutors and taskScheduler in spring messaging & websocket#28719
CodeInDreams wants to merge 1 commit into
spring-projects:mainfrom
CodeInDreams:fix-executors-autowiring

Conversation

@CodeInDreams

Copy link
Copy Markdown
Contributor

There are several beans require TaskExecutor or TaskScheduler without @Qualifier, which means inject wrong executors if we declare some executor bean @Primary.
I found the problem by changing taskExecutor in WebSocketMessageBrokerConfigurer#configureClientInboundChannel

@Override
public void configureClientInboundChannel(@NonNull ChannelRegistration registration) {
    registration.interceptors(authInterceptor);
    registration.taskExecutor(myExecutor());
}

@pivotal-cla

Copy link
Copy Markdown

@CodeInDreams Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla

Copy link
Copy Markdown

@CodeInDreams Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 28, 2022
@sbrannen

Copy link
Copy Markdown
Member

Hi @CodeInDreams,

Congratulations on submitting your first PR ever on GitHub!

Unfortunately, this is a breaking change. Furthermore, it reverts the intentional changes made in conjunction with #26227.

In light of that, I am closing this PR.

@sbrannen sbrannen closed this Jun 28, 2022
@sbrannen sbrannen added in: messaging Issues in messaging modules (jms, messaging) in: web Issues in web modules (web, webmvc, webflux, websocket) status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 28, 2022
@CodeInDreams

Copy link
Copy Markdown
Contributor Author

Hi @CodeInDreams,

Congratulations on submitting your first PR ever on GitHub!

Unfortunately, this is a breaking change. Furthermore, it reverts the intentional changes made in conjunction with #26227.

In light of that, I am closing this PR.

Then we should either use @Qualifier or not to use autowiring. @sbrannen If agree with me, which do you prefer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: messaging Issues in messaging modules (jms, messaging) in: web Issues in web modules (web, webmvc, webflux, websocket) status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants