Request Trial Super fast, scalable and reliable WebSocket Java Framework for real-time web communication

Super fast, scalable and reliable Java WebSocket Server
Framework for real-time web communication

Why Connectanum?

The connectanum Java WebSocket Server is a full featured WAMP router and client that implements most important advanced features for enterprise project development.

Connectanum uses WebSockets to connect browsers to a distributed, multi language business logic. Hereby it is possible to build a loosely coupled distributed computing network.

A WebSocket connection cannot be used without a sophisticated subprotocol. Connectanum offers support for distributed remote procedure calls (RPC) as well as the publish/subscribe pattern. Reactivity as known from AngularJS or ReactJs may not just be a part of your browser framework. With connectanum it is possible to have this kind of reactivity throughout your whole system.

The animation shows how multiple clients are connected to the connectanum router. Messages are getting forwarded between those clients by using remote procedure calls and publish events.

Shows the PUB/SUB and RPC functionality of connectanum


Connectanum offers interfaces for nearly every part of the core system. It was developed to be highly customizable and extensible by it's nature. Most of all methods have descriptions on how to use them.

The Code

Super fast

It is based on Netty NIO-Classes (non blocking) that drive nearly all professional Java frameworks for distributed systems. A flat router logic and header only message parsing causes a very low computing cost even for long messages.

Try Yourself


The Router has no business logic. Clients are scalable by their nature. Every route has a scalability option (Round Robin, First, Last, Random) and routing logic is non-blocking. The behaviour can be configured for each separate procedure.


Connectanum in action

This demo uses the following environment:

Browser (Client 1 + Client 2)

Connectanum (Router)

  • Raspberry Pi 1 model b+ at ARM processor at 800MHz (0.5 - 1 Watt) to run the connectanum daemon.
  • Raspbian kernel version 4.4 as OS
  • Java v1.8_92 to run connectanum in the VM

The connectanum server runs pretty fast and can handle hundreds of messages per second even on this very low performing server. You may see RTT < 20ms depending on your connection and your latencies. We have measured >=9ms in a local environment on this raspberry pi. Higher latencies may most probably be caused by the network bandwidth and latency.

Client 1 Connected Disconnected

Round trip time for the last message: ms 

Client 2 Connected Disconnected

Round trip time for the last message: ms 

angular.module('connectanum', [''])
    .controller("DemoCtrl",["$scope","Wamp", function ($scope, Wamp) {
        $scope.client1 = Wamp.getInstance();
        $scope.client2 = Wamp.getInstance();

        var topic = "demo.connectanum.receive";

        function initialize(client){
                client.getSession().subscribe(topic, function (args) {
                    client.lastMessage = args[0];
                    client.roundTripMs = (new Date()).getTime() - args[1];
                    $scope.$$phase || $scope.$apply();

        $scope.sendMessageTo1 = function (message) {
            $scope.client2.getSession().publish(topic,[message,(new Date()).getTime()],{},{eligible:[$scope.client1.getSession().id]})
        $scope.sendMessageTo2 = function (message) {
            $scope.client1.getSession().publish(topic,[message,(new Date()).getTime()],{},{eligible:[$scope.client2.getSession().id]})

        $scope.$on("wamp.connected", function (event,client) {
            client.loginSuccess = true;
            $scope.$$phase || $scope.$apply();

        $scope.$on("wamp.closed", function (event,client) {
            client.loginSuccess = false;
            $scope.$$phase || $scope.$apply();

        $scope.login = function () {

        $scope.logout = function () {

angular.module('', [])
    .factory("Wamp", ["$rootScope",function ($rootScope) {
        var Wamp = function(){
            this._session = null;
            this._details = null;

        Wamp._connector = autobahn.Connection;

        Wamp.prototype = {
            login : function (username,password) {
                var self = this;

                this._connection = new Wamp._connector({
                    authid: username,
                    onchallenge: (function (password) {
                        return function (session, method, extra) {
                            if (method === "wampcra") {
                                return autobahn.auth_cra.sign(
                                    autobahn.auth_cra.derive_key(password || "", extra.salt,extra.iterations,extra.keylen),

                this._connection.onopen = function (session) {
                    self._session = session;

                this._connection.onclose = function (reason,details) {
                    if(reason === "closed"){
                        if(details.reason === "wamp.error.authorization_failed"){
                    }else if(reason === "lost"){
                    }else if(reason === "unreachable"){
                    }else if(reason === "unsupported"){
                    this._session = null;
            logout : function () {
                this._session = null;
            getSession : function () {
                return this._session;

        return new (function () {
            this.getInstance = function () {
              return new Wamp();

Open Connections

CPU Times