Skip to content

Conversation

artembilan
Copy link
Member

Fixes #18812

To reuse RSocket server auto-configuration in Spring Integration,
introduce an IntegrationAutoConfiguration.IntegrationRSocketConfiguration
based on the ServerRSocketMessageHandler from Spring Integration which
overrides an RSocketMessagingAutoConfiguration when SI is present on
classpath.
Configure a ServerRSocketMessageHandler from SI which is able to handle
SI RSocket channel adapters and @MessageMapping if configured via
new IntegrationProperties.RSocket.Server.messageMappingEnabled.
Then add a ServerRSocketConnector which is based on the provided
ServerRSocketMessageHandler.
Also auto-configure a ClientRSocketConnector if
IntegrationProperties.RSocket.Client.port or
IntegrationProperties.RSocket.Client.uri configuration properties are
present

Fixes spring-projects#18812

To reuse RSocket server auto-configuration in Spring Integration,
introduce an `IntegrationAutoConfiguration.IntegrationRSocketConfiguration`
based on the `ServerRSocketMessageHandler` from Spring Integration which
overrides an `RSocketMessagingAutoConfiguration` when SI is present on
classpath.
Configure a `ServerRSocketMessageHandler` from SI which is able to handle
SI RSocket channel adapters and `@MessageMapping` if configured via
new `IntegrationProperties.RSocket.Server.messageMappingEnabled`.
Then add a `ServerRSocketConnector` which is based on the provided
`ServerRSocketMessageHandler`.
Also auto-configure a `ClientRSocketConnector` if
`IntegrationProperties.RSocket.Client.port` or
`IntegrationProperties.RSocket.Client.uri` configuration properties are
present
@artembilan artembilan changed the title GH-18812: Add auto-config for SI RSocket support [DO NOT MERGE YET] GH-18812: Add auto-config for SI RSocket support Nov 1, 2019
@artembilan
Copy link
Member Author

Depends on spring-projects/spring-integration#3097

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 1, 2019
@wilkinsona wilkinsona added the status: blocked An issue that's blocked on an external project change label Nov 1, 2019
@artembilan artembilan changed the title [DO NOT MERGE YET] GH-18812: Add auto-config for SI RSocket support GH-18812: Add auto-config for SI RSocket support Nov 1, 2019
@artembilan
Copy link
Member Author

The upstream PR in SI has been merged, so this is ready for review and feedback.

While I'm here I have realized that such an integration test I have here with an explicit port for RSocket server could be is not what you would like to see in the auto-configuration module.
The sample might be the better place to show the feature and in this new test it would be better to check just bean auto-configured after apply all the conditions.

Let me know how to proceed!

Also: do you need some docs on the matter?

Thanks

@bclozel bclozel self-requested a review November 2, 2019 10:01
@bclozel bclozel removed the status: blocked An issue that's blocked on an external project change label Nov 2, 2019
@philwebb philwebb added the for: team-attention An issue we'd like other members of the team to review label Nov 5, 2019
@philwebb philwebb changed the title GH-18812: Add auto-config for SI RSocket support Add auto-configuration for Spring Integration RSocket support Nov 5, 2019
@philwebb philwebb added status: pending-design-work Needs design work before any code can be developed type: enhancement A general enhancement and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Nov 6, 2019
@philwebb philwebb added this to the 2.3.x milestone Nov 6, 2019
Spring integration RSocket support if there is no any Spring Integration
RSocket channel adapters
* Change `IntegrationAutoConfigurationTests.rsocketSupportEnabled()`
to check auto-configured beans instead of integration testing
@wilkinsona
Copy link
Member

Let's look at this for 2.3.0.M2.

@bclozel bclozel self-assigned this Feb 6, 2020
@bclozel bclozel modified the milestones: 2.3.x, 2.3.0.M3 Mar 3, 2020
@bclozel bclozel closed this in 3967e76 Mar 3, 2020
@bclozel bclozel removed the status: pending-design-work Needs design work before any code can be developed label Mar 3, 2020
bclozel added a commit that referenced this pull request Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto Configure ClientRSocketConnector and ServerRsocketConnect for Spring integration RSocket
5 participants