Stomp implementation is tend to follow the protocol description at https://stomp.github.io/stomp-specification-1.2.html
Websocket implementation is intended to follow RFC6455 with some limitations:
Some features are under implementation, especially in the following area
- Lack of security (WS/STOMP)
- No fragmented messages (WS)
- Taking only limited size messages: (WS/STOMP). See config on startup.
- Messaging patterns
Number of connections are limited: Too many open file error can occure, oncrease the file limits for chlid-processes with
ulimit -n 5000
Config parameters via command line args
Every argument are optional
Usage example: ./stompbroker.out processors=10 port=3000 TTL=5000 processors=<num> : writers count is processors-2 or at least 1 port=<num> : port to listen to max_input_queue_size=<num> : input queue limit max_stale_queue_size=<num> : stale queue limit TTL=<num> : Time to live limit in <milli seconds>
current implementation uses epoll: input queue is processed by a single thread
It makes backpressure with starting as many output thread as free cores left. In the future it must be balanced. Further measurements needed.
In a TTL=0 case, 1 nodejs connection, 117 bytes messages over WS with 75 subscribers it was able to deliver 1M messages under 9 seconds on a 2014 mac-book air (i5). That means 120Mb / sec over loopback interface.
The following list are notes about implementing features in priority order
The first character of the line can contain the following status codes:
?: To be defined, unknown or need decomposition+: Implemented and ready-: Not implemented yet~: Implemented, but it is incomplete
A) You can build it with
./build.sh having gcc and build essentials installed
on a 64bit arhitecture.
B) Docker files are located under the folder
C) There is an npm module distribution available for nodejs running on linux
npm i -g stompica echo "require('stompica').runDefault()" | node
or you can pass arguments from nodejs:
arguments have to be numbers in the following order: processors, port, input_q, stale_q, TTL millies
value 0 -> configure to the default