Maven support for rsocket rcp compiler


has anyone created a pom to run the rcp compiler on the Protobuf compiler generated java files?


If you look at proteus-spring-quickstart there is an example of using protobuf-maven-plugin along with the rsocket-rpc-protobuf plugin to compile rsocket-rpc service definitions:



How about from the page

Working example

To see a working example of the code described here please view the SimpleServiceTest class.
This page does not exist, has it moved?


Hi - that is old documentation - please checkout



Thanks, next question. The io.netifi.proteus packages are not in maven, I have only found the jar files in a git repo, are they intended for production and if so why are they not in maven central. Is there another set of packages I should be using in their place?

Ok found the answer, you have your own public repo, added to my settings.xml, now I have access to your repo.


Referring to
I created the DefaultSimpleService and then the server
public class ServerMain
private static final Logger logger = LoggerFactory.getLogger(ServerMain.class);

public static void main(String… args) throws Exception
{“Starting ServerMain”);
RSocket RPC Server Configuration

  Each generated service has a client and server implementation generated for you. After you have
  implemented the generated interface you need to hand the implementation to the server.
SimpleServiceServer serviceServer = new SimpleServiceServer(new DefaultSimpleService(), Optional.empty(), Optional.empty());

  Once you have created an instance of the the server you need to configure RSocket.
  The following is a RSocket server configuration.
CloseableChannel server = RSocketFactory
    .acceptor((setup, sendingSocket) -> Mono.just(
        new RequestHandlingRSocket(serviceServer)
    .block(Duration.ofSeconds(10));"server created");
// Keep the Service Running

// Thread.sleep(15_000);
// server.dispose();
//“server shutdown”);
// server.onClose().block();

I started the server and then the client and it fails to connect to the server
[main] INFO io.rsocket.rpc.testing.protobuf.ClientMain - Starting ClientMain
Exception in thread “main” reactor.core.Exceptions$ReactiveException:$AnnotatedConnectException: syscall:getsockopt(…) failed: Connection refused: /
at reactor.core.Exceptions.propagate(
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(
at reactor.core.publisher.Mono.block(
at io.rsocket.rpc.testing.protobuf.ClientMain.main(
Suppressed: java.lang.Exception: #block terminated with an error
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(
… 2 more
Caused by:$AnnotatedConnectException: syscall:getsockopt(…) failed: Connection refused: /
at…)(Unknown Source)
Caused by:$NativeConnectException: syscall:getsockopt(…) failed: Connection refused
… 1 more

any ideas what I missed?



Proteus-RPC became RSocket RPC and those packages are in MavenCentral:

The proteus client for the proteus broker is in JCenter.

Your exception says Connection refused: / not 8081. Are you connecting to the wrong port?



fixed the port mismatch both 8081. The real issue is that the server process has completed in less than one second, leaving nothing for the client to connect to.



The server threads are daemons so you need to block somewhere so you don’t exit. You can do something like this:

public static void main(String... args) throws Exception {
    SimpleServiceServer serviceServer = new SimpleServiceServer(new DefaultSimpleService(), Optional.empty(), Optional.empty());
    CloseableChannel closeableChannel =
                (setup, sendingSocket) -> Mono.just(new RequestHandlingRSocket(serviceServer)))
    // Block so we don't exit

I created an example project from the rsocket-rpc-java readme:



Thanks for your help Robert. Lowell