Overview Tutorial API reference Examples Build Download ZmqMessage 0.1 - 21 Oct 2011

What multipart messages are and why we need them

ZMQ documentation says on multipart messages the following:

A ØMQ message is composed of 1 or more message parts; each message part is an independent zmq_msg_t in its own right. ØMQ ensures atomic delivery of messages; peers shall receive either all message parts of a message or none at all.

The total number of message parts is unlimited.

An application wishing to send a multi-part message does so by specifying the ZMQ_SNDMORE flag to zmq_send(). The presence of this flag indicates to ØMQ that the message being sent is a multi-part message and that more message parts are to follow. When the application wishes to send the final message part it does so by calling zmq_send() without the ZMQ_SNDMORE flag; this indicates that no more message parts are to follow.

Thus multipart messages may be used to implement custom text/binary protocols of arbitrary complexity based on ZeroMQ.

The goal of ZmqMessage library is to make working with multipart messages as convenient as possible.


ZmqMessage 0.1 — open source software, support@zmqmessage.org