What library can I use to do simple, lightweight message passing?

泄露秘密 提交于 2019-11-30 07:26:59

Take a look at ØMQ, i.e. ZeroMQ.

Apache Qpid implements server and client libraries for Advanced Message Queuing Protocol. It has many features, from which you can use the following:

  1. Client can connect anonymous on the broker, specifying broker's IP/port
  2. Transport protocol is TCP or SCTP
  3. It has support for large messages using either pull style or push style semantics
  4. It's fast
  5. Usage is simple and available in C++:

I use nanomsg for my distributed system. nanomsg is stable, mature, well supported light-weight messaging protocol library written in C.

It fulfills all your requirements:

1)  There is no external setup required
2)  TCP underlying protocol is a primary one. 
3)  Message sizes supported by nanomsg are expressed as a 64-bit integer.
 (The default message size is 1024kB. This can be easily changed by API call to 
 support any size. The maximum size is limited only by available addressable memory!)

The other good library to consider is nng. It is in betta stage now.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!