[zeromq-dev] multi-part messages

Pieter Hintjens ph at imatix.com
Tue Mar 29 23:00:29 CEST 2011


On Tue, Mar 29, 2011 at 10:46 PM, Andrew Hume <andrew at research.att.com> wrote:

> i've always wante dto know why people bother with multipart messages.
> is there a size limit somewhere?

Multipart messages are memory bound in any case and fragmentation of
large messages is *not* a valid use case (someone asked about this,
for file transfer, today on IRC).

The use cases I'm aware of are:

- scatter/gather of different buffers to achieve zero-copy, e.g. when
prefixing an application buffer with a topic key for pub-sub
- minimalist field framing, e.g. as used http://rfc.zeromq.org/spec:7,
or for topic/body separation in pub-sub
- separation of address envelopes from content (e.g. messages passed
via ROUTER/XREP sockets)
- logical separation of layers, e.g. API may wrap an application
message, which is close to the envelopes use case.

-Pieter



More information about the zeromq-dev mailing list