[zeromq-dev] multi-part messages

Pieter Hintjens ph at imatix.com
Sun Jan 22 15:58:49 CET 2012


On Sat, Jan 21, 2012 at 6:29 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:

> The original reason for introducing multi-part messages was (as Patrick
> correctly explains) to allow for requests messages to gather the list of
> nodes it have travelled through, so that corresponding reply message can
> travel in the opposite direction.
>
> Unfortunately, this functionality, aside of being used by 0MQ itself,
> was exposed to the end users.

This is a subtle form of humor, to claim that this is somehow internal
functionality exposed by accident and used by naive users in the wrong
way? And then to propose removing it and replacing it with something
you yourself originally dismissed as unusable?

Read the list archives please. Specifically this thread:
http://lists.zeromq.org/pipermail/zeromq-dev/2010-March/002438.html

This is the first mention of "multipart" in ZeroMQ. You will see that
the discussion starts with Michael Santy and Brian Granger explicitly
requesting a way to do zero-copy for performance reasons. A bit later,
Dhammika Pathirana proposes scatter-gather arrays and you (Martin) say
that would not work, and instead you say,

> I've been following different train of thought: When sending data like those in Michael's scenario, the splits are not random. Rather they mirror business logic of the application. For example, the structure of the message may look like this (matrixA, matrixB, matrixC).

And we end up with the simple, useful and widely used API we have today.

-Pieter



More information about the zeromq-dev mailing list