You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
of the Spring Framework reference for more details, including an overview of the RSocket protocol.
2938
-
2934
+
The `spring-messaging` module of the Spring Framework provides support for RSocket requesters and responders, both on the client and on the server side.
2935
+
See the {spring-framework-docs}web-reactive.html#rsocket-spring[RSocket section] of the Spring Framework reference for more details, including an overview of the RSocket protocol.
Spring Boot provides RSocket server auto-configuration.
2959
2956
The required dependencies are provided by the `spring-boot-starter-rsocket`.
2960
2957
2961
-
Spring Boot allows exposing RSocket over WebSocket from a WebFlux server, or standing up an independent RSocket TCP server.
2958
+
Spring Boot allows exposing RSocket over WebSocket from a WebFlux server, or standing up an independent RSocket server.
2962
2959
This depends on the type of application and its configuration.
2963
2960
2964
2961
For WebFlux application (i.e. of type `WebApplicationType.REACTIVE`), the RSocket server will be plugged into the Web Server only if the following properties match:
@@ -2972,7 +2969,7 @@ For WebFlux application (i.e. of type `WebApplicationType.REACTIVE`), the RSocke
2972
2969
2973
2970
WARNING: Plugging RSocket into a web server is only supported with Reactor Netty, as RSocket itself is built with that library.
2974
2971
2975
-
Alternatively, an RSocket TCP server is started as an independent, embedded server.
2972
+
Alternatively, an RSocket TCP or websocket server is started as an independent, embedded server.
2976
2973
Besides the dependency requirements, the only required configuration is to define a port for that server:
@@ -2987,23 +2984,19 @@ Besides the dependency requirements, the only required configuration is to defin
2987
2984
=== Spring Messaging RSocket support
2988
2985
Spring Boot will auto-configure the Spring Messaging infrastructure for RSocket.
2989
2986
2990
-
An `RSocketStrategies` bean is created to provide encoding and decoding support for RSocket messages.
2991
-
By default, Spring Boot will try to auto-configure JSON support with Jackson for `application/json` and `"application/*+json"` media types.
2992
-
Check out the <<boot-features-json-jackson,Jackson support section>> to know more about customization possibilities.
2993
-
2994
-
Developers can create `RSocketStrategiesCustomizer` beans to add other strategies, assuming there are `Encoder` and `Decoder` implementations available.
2995
-
2987
+
This means that Spring Boot will create a `RSocketMessageHandler` bean that will handle RSocket requests to your application.
2996
2988
2997
2989
2998
2990
[[boot-features-rsocket-requester]]
2999
2991
=== Calling RSocket Services with `RSocketRequester`
3000
2992
Once the `RSocket` channel is established between server and client, any party can send or receive requests to the other.
3001
2993
3002
-
As a server, you can get injected an `RSocketRequester` instance on any handler method of an RSocket `@Controller`.
2994
+
As a server, you can get injected with an `RSocketRequester` instance on any handler method of an RSocket `@Controller`.
3003
2995
As a client, you need to configure and establish an RSocket connection first.
3004
2996
Spring Boot auto-configures an `RSocketRequester.Builder` for such cases with the expected codecs.
3005
2997
3006
-
The `RSocketRequester.Builder` instance is a prototype bean, meaning each injection point will provide you with a new instance - this is done on purpose since this builder is stateful and you shouldn't create requesters with different setups using the same instance.
2998
+
The `RSocketRequester.Builder` instance is a prototype bean, meaning each injection point will provide you with a new instance .
2999
+
This is done on purpose since this builder is stateful and you shouldn't create requesters with different setups using the same instance.
3007
3000
3008
3001
The following code shows a typical example:
3009
3002
@@ -3016,7 +3009,7 @@ The following code shows a typical example:
3016
3009
3017
3010
public MyService(RSocketRequester.Builder rsocketRequesterBuilder) {
0 commit comments