When I created a sample project to taste Spring Integration RSocket, but I have to create ServerRSocketConnector
and ClientRSocketConnector
beans. And the ServerRSocketConnector
will create a new RSocket server that could cause a port binding error when running it as a standalone Spring Boot RSocket application if using the same port number.
See: https://stackoverflow.com/questions/58603425/error-running-spring-integration-rsocket-sample-with-spring-boot
It is better to provide auto-configuration to detect the existing RSokcet server and create Spring Integration RSocket facilities based on the existing.
Comment From: artembilan
I think we should consider to auto-configure a ClientRSocketConnector
only in tests when we would like to verify RSocket requests against started RSocket server for test scope. In most cases with random port.
It really does not make sense to always instantiate a ClientRSocketConnector
whenever we detect RSocket support.
We may consider to have something like spring.integration.rsocket.client.uri
configuration property to indicate that we need to create a particular RSocket client though...
But at the same time we can simply live with a direct ClientRSocketConnector
instantiation when we also can inject auto-configured RSocketStrategies
.
For the server side I need to think more from Spring Integration perspective.
Right now there is no way to co-locate a regular Spring Messaging @MassageMapping
approach and Spring Integration IntegrationRSocketEndpoint
in the same RSocket server...
The ServerRsocketConnect
just encapsulates the whole logic to start a new server - no way to bind to existing one what is done here in Spring Boot.
Comment From: philwebb
Closing in favor of PR #18834
Comment From: hantsy
Hi, I have refactored my samples using Spring Boot RSocket and Spring Integration RSocket, I have some issues about interaction between them.
I described it in a new question on stackoverflow.
The sample codes can be found here.
Comment From: artembilan
@hantsy ,
please, don't abuse a purse of GH issues and PRs. We definitely are going take a look into your question on StackOverfow when our weekend is over.
Thanks for understanding.