An RSocket controller is a Spring component whose message-handler methods respond to client requests addressed to configured routes. Unlike a web controller, it maps messages with @MessageMapping instead of mapping HTTP paths. section 14.2.1
A request-response handler typically:
- Accepts the incoming payload as Mono<String> or another suitable type. section 14.2.1
- Transforms the payload with Mono.map() and returns a reactive response. section 14.2.1
- Uses route placeholders such as greeting/{name}, with @DestinationVariable extracting the value. section 14.2.1
Greeting route
A @Controller method mapped to greeting logs the received message and returns “Hello back to you!”. A client can call greeting/{name} and receive a personalized response.
