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
Provide an RSocketMessageHandlerCustomizer to allow customizing of the RSocketMessageHandler #20303
Comments
This is following up on #18356 (comment) |
I can pick this up ! |
@aartiguptaa thank you very much, it's all yours. Let us know if you have any question. |
If something comes up and @aartiguptaa will not be able to complete the task, I'm available to take over. |
@aartiguptaa how's it going? Please let us know if you need any help tackling this issue. |
Hi looks like this one's gone. please let me know if there is any first timer issue which I can contribute to? Thanks |
@logicatmidod we can't let you know when there are a first timer issue available. If you're trying to contribute, I've answered a similar question this morning, please read this comment. We prefer no to use the issue tracker for questions so for any follow-up questions on the project, please join the community on Gitter. |
Apologies for the delay folks, I am working on this now, and should have more updates this weekend. |
@aartiguptaa How are things? Do you need help with anything? @corneliouzbett I've answered that question already here but it was hidden so I just changed that. |
I am not sure I got the question. |
The instructions say "The ObjectProvider interface can be used for injecting a dependency. Here is an example that can be used to inject customizers when there can be 0..n of them." which dependency should Is it the message handler bean ? or a customizer bean? @Bean
@ConditionalOnMissingBean(RSocketMessageHandler.class)
public <WhatType?> RSocketMessageHandler(ObjectProvider<RSocketMessageHandlerCustomizer> customizers) {
(what should this inject?)
} |
@aartiguptaa The existing method that looks like this:
would be changed to take the new optional customizer dependency using
Inside of that method, each |
Trying to push a PR, on a new branch, do I need special permissions to add a new branch? |
@aartiguptaa You'll need to create your own fork of the After creating a fork, you should be able to
to point the
to push your new branch to your own fork. Once the branch is pushed to your fork, see the github docs for creating a pull request. |
Closing in favour of #21081. |
Hi, this is a
first-timers-only
issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!
If you have contributed before, consider leaving this one for someone new, and looking through our general
ideal-for-contribution
issues. Thanks!Background
Spring Boot provides a number of callback interfaces that can be used to customize the beans that it auto-configures. For example, a
TomcatConnectorCustomizer
can be used to customize a TomcatConnector
.Problem
At the moment, the only way to add customizations to a
RSocketMessageHandler
is to provide your ownRSocketMessageHandler
bean which completely overrides the auto-configuredRSocketMessageHandler
bean. This can be bit tedious and we should allow providing customizers instead which can be applied to the bean created by Spring Boot.It would look something like:
Solution
Add a
RSocketMessageHandlerCustomizer
type. Beans ofRSocketMessageHandlerCustomizer
type should be applied automatically toRSocketMessageHandler
, this can be done here.The
ObjectProvider
interface can be used for injecting a dependency. Here is an example that can be used to inject customizers when there can be 0..n of them.Tests are here.
Steps to Fix
The text was updated successfully, but these errors were encountered: