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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.