RSocket in Java

The RSocket protocol and interaction model found a place and a high demand in Java (along with implementations in C++, JS, Python, and Go) and is implemented on top of Reactor 3. The following programming model is offered by the RSocket-Java module:

RSocketFactory                                                     // (1)   .receive()                                                      // (1.1)   .acceptor(new SocketAcceptorImpl())                             // (1.2)   .transport(TcpServerTransport.create("localhost", 7000))        // (1.3)   .start()                                                        // (1.4)   .subscribe();                                                   //RSocket socket = RSocketFactory                                    // (2)   .connect()                                                      // (2.1)   .transport(TcpClientTransport.create("localhost", 7000))        //    .start()                                                        //   .block();                                                       // (2.2)socket                                                             // (3)   .requestChannel(                                                // (3.1)      Flux.interval(Duration.ofMillis(1000))                       // .map(i -> DefaultPayload.create("Hello [" + i + "]")) // (3.2) ...

Get Hands-On Reactive Programming in Spring 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.