spring-projects / spring-projects/spring-framework

RSocket Functional route & Kotlin DSL

Open
#23,135 2 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: messaging type: enhancement
Dominant language
Java
Stars
60.2k
Forks
38.8k
Avg merge
5d 2h
Merged PRs (30d)
27

Description

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) {
        // ...
    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing RSocket support and how functional routes are implemented for Spring WebFlux and Spring MVC. Define the scope for RSocket functional routing, Kotlin DSL support, MessageMapping-style destinations, and payload data serialization; done requires an agreed design and corresponding coverage for the proposed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin, spring
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.