Now functional route is useful feature for Spring WebFlux and SpringMVC, and it's possible to add this feature for RSocket? Functional route is very convenient with functional style, especially for Kotlin, and all are functions and messages/events.

    @Bean
    public RouterFunction locateRoutes() {
        return RouterFunctions
                .route(RPC("findId"), payload -> Mono.just(DefaultPayload.create("hello")))
                .andRoute(FIRE("notifyLogin"), payload -> Mono.empty())
                .andRoute(STREAM("accounts"), payload -> Flux.empty());
    }

Two hard things: MessageMapping and payload data serialization. I like following style, and it's very useful sometimes.

    @MessageMapping("users.{user}.info")
    Mono<ChatUserInfo> getUserInfo(@DestinationVariable String user, Body body) {
        // ...
    }

Comment From: sdeleuze

@rstoyanchev Is RSocketRequester the recommended functional alternative to MessageMapping? If yes, how @MessageMapping("users.{user}.info") and @DestinationVariable would translate? Is there some special configuration to use for enabling composite metadata?

Comment From: sdeleuze

After discussing that with @rstoyanchev, we indeed miss a functional way to define RSocket routes. I think it is a too late for 5.2, but it would perfectly makes sense for 5.3 IMO. This should be implemented in Java with an additional Kotlin DSL like what with did on WebFlux.fn.