xMsg is a lightweight, yet full featured publish/subscribe messaging system, presenting asynchronous inter-process communication.
xMsg actors are required to publish and/or subscribe to messages. The messages are identified by topics, and contain metadata and user-serialized data. xMsg topic convention defines three parts: domain, subject, and type. The data is identified by the mime-type metadata field, which can be used by applications to deserialize the raw bytes into its proper data-type object.
Multi-threaded publication of messages is supported, with each thread using its own connection to send messages. Subscriptions run in a background thread, and each received message is processed by a user-defined callback executed by a thread-pool. Note that the provided callback must be thread-safe.
A proxy must be running in order to pass messages between actors. Messages must be published to the same proxy than the subscription, or the subscriber will not receive them. Long-lived actors can register with a global registrar service if they are periodically publishing or subscribed to a given topic, and others actors can search the registrar to discover them.
The reference documentation is available at https://claraweb.jlab.org/xmsg/.
xMsg requires a C++14 compiler and CMake 3.5+
Install GCC and CMake from the repositories:
$ sudo apt install build-essential cmake
Install Xcode command line tools:
$ xcode-select --install
Install CMake using Homebrew:
$ brew install cmake
xMsg uses Protocol Buffers and ZeroMQ.
Install from the repositories:
$ sudo apt install libzmq5-dev libprotobuf-dev protobuf-compiler
Use Homebrew:
$ brew install zeromq protobuf
To build with CMake a configure wrapper script is provided:
$ ./configure --prefix=<INSTALL_DIR>
$ make
$ make install
When installing as a dependency for CLARA,
the <INSTALL_DIR>
prefix should be preferably $CLARA_HOME
.
- Vardan Gyurjyan
- Sebastián Mancilla
- Ricardo Oyarzún
For assistance send an email to [email protected].