As of #16021, Spring Boot supports RSocket as a server. Protobuf is a popular solution for messages (de)serialization and it seems to align well with the RSocket paradigm.
This issue should consider whether and how we should:
- auto-configure Protobuf codecs for RSocket
- provide configuration properties
- provide dependency management
- do additional work in the Spring Boot application builds
Comment From: eiswind
As of 2.2.2 I had to disable RSocketServerAutoConfiguration and add:
@Bean
CloseableChannel server(GreetingServiceServer serviceServer){
return RSocketFactory
.receive()
.acceptor((setup, sendingSocket) -> Mono.just(
new RequestHandlingRSocket(serviceServer)
))
.transport(TcpServerTransport.create(serverPort))
.start()
.block();
}
I did not manage to use a protobuf service and a spring messagehandler in the same application.
Perhaps it is possible to autodetect the rpc-services?