Rsocket Java

Java implementation of RSocket
Alternatives To Rsocket Java
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Bacon.js6,4438,6962683 months ago222November 03, 202090mitTypeScript
Functional reactive programming library for TypeScript and JavaScript
Reactive6,1691,3581,6902 days ago37June 14, 2023137mitC#
The Reactive Extensions for .NET
Reactive Streams Jvm4,68036176725 days ago22May 22, 202226mit-0Java
Reactive Streams Specification for the JVM
Reactor Core4,6681,00560715 hours ago130July 11, 2023131apache-2.0Java
Non-Blocking Reactive Foundation for the JVM
Rxpy4,5282725 days ago15July 16, 202238mitPython
ReactiveX for Python
Reactor3,5455816611 days ago118July 11, 202310apache-2.0
Reactor Bill Of Materials (tracking reactor-core, reactor-netty and more)
Most3,4531,070306a year ago79October 08, 202048mitJavaScript
Ultra-high performance reactive programming
Rsocket Java2,26943914 months ago46June 06, 202337apache-2.0Java
Java implementation of RSocket
Marble2,0819217 months ago159March 06, 20235mitTypeScript
Marble.js - functional reactive Node.js framework for building server-side applications, based on TypeScript and RxJS.
Kefir1,8289,2102627 months ago86November 28, 202038mitJavaScript
A Reactive Programming library for JavaScript
Alternatives To Rsocket Java
Select To Compare

Alternative Project Comparisons


Join the chat at

RSocket is a binary protocol for use on byte stream transports such as TCP, WebSockets, and Aeron.

It enables the following symmetric interaction models via async message passing over a single connection:

  • request/response (stream of 1)
  • request/stream (finite stream of many)
  • fire-and-forget (no response)
  • event subscription (infinite stream of many)

Learn more at

Build and Binaries

Build Status

⚠️ The master branch is now dedicated to development of the 1.2.x line.

Releases and milestones are available via Maven Central.


repositories {
    maven { url '' }  // Reactor milestones (if needed)
dependencies {
    implementation 'io.rsocket:rsocket-core:1.2.0-SNAPSHOT'
    implementation 'io.rsocket:rsocket-transport-netty:1.2.0-SNAPSHOT'

Snapshots are available via (OJO).


repositories {
    maven { url '' }
    maven { url '' }  // Reactor snapshots (if needed)
dependencies {
    implementation 'io.rsocket:rsocket-core:1.2.0-SNAPSHOT'
    implementation 'io.rsocket:rsocket-transport-netty:1.2.0-SNAPSHOT'


Install the google-java-format in Intellij, from Plugins preferences. Enable under Preferences -> Other Settings -> google-java-format Settings

Format automatically with

$./gradlew goJF


Frames can be printed out to help debugging. Set the logger io.rsocket.FrameLogger to debug to print the frames.


Trivial Client

package io.rsocket.transport.netty;

import io.rsocket.Payload;
import io.rsocket.RSocket;
import io.rsocket.core.RSocketConnector;
import io.rsocket.transport.netty.client.WebsocketClientTransport;
import io.rsocket.util.DefaultPayload;
import reactor.core.publisher.Flux;


public class ExampleClient {
    public static void main(String[] args) {
        WebsocketClientTransport ws = WebsocketClientTransport.create(URI.create("ws://"));
        RSocket clientRSocket = RSocketConnector.connectWith(ws).block();

        try {
            Flux<Payload> s = clientRSocket.requestStream(DefaultPayload.create("peace"));

            s.take(10).doOnNext(p -> System.out.println(p.getDataUtf8())).blockLast();
        } finally {

Zero Copy

By default to make RSocket easier to use it copies the incoming Payload. Copying the payload comes at cost to performance and latency. If you want to use zero copy you must disable this. To disable copying you must include a payloadDecoder argument in your RSocketFactory. This will let you manage the Payload without copying the data from the underlying transport. You must free the Payload when you are done with them or you will get a memory leak. Used correctly this will reduce latency and increase performance.

Example Server setup

RSocketServer.create(new PingHandler())
        // Enable Zero Copy

Example Client setup

RSocket clientRSocket =
            // Enable Zero Copy

Bugs and Feedback

For bugs, questions and discussions please use the Github Issues.


Copyright 2015-2020 the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Popular Stream Projects
Popular Reactive Projects
Popular Control Flow Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.