GSLAM  3.0.0
Messenger: A Tiny Class Implemented ROS Like Pub/Sub Messaging.

Messenger: A light-weight, efficient, thread-safe message publish and subscribe tool similar with ROS, a popular robot operating system.

The tool has the following features:

// example.cpp
#include <GSLAM/core/Messenger.h>
using namespace GSLAM;
int main(int argc,char** argv)
{
Subscriber sub=messenger.subscribe("topic_name",[](std::string msg){
std::cerr<<"Received string msg "<<msg<<std::endl;
});
// publish message without creating a Publisher
messenger.publish("topic_name","hello world!");
Publisher pub=messenger.advertise<std::string>("topic_name");
pub.publish("hello Messenger!");
return 0;
}
Warning
The Subscriber will auto shutdown, please hold the Subscriber instance until you want to unsubscribe.

Inter-process Messaging through Network

The core Messenger only provides high performance intra messaging, extra work is needed to support inter-process communication.

GSLAM implemented some plugins to let Messenger support network messaging.

gslam_nsq: https://github.com/pi-gslam/gslam_nsq