[zeromq-dev] multi-part messages

Pieter Hintjens ph at imatix.com
Sun Jan 22 16:48:32 CET 2012

On Sun, Jan 22, 2012 at 9:36 AM, john skaller
<skaller at users.sourceforge.net> wrote:

> The problem is like this: if you use say an array, you can put the
> pieces into it in any temporal order. This allows you to write
> simple code.

This is an accurate statement of the problem, but the answer doesn't
lie in the low level API. In CZMQ, for instance, we solve this by
treating a "message" as a multipart object (composed of frames), which
we can send and receive in one step, and work with separately, as an
array, list, stack, whatever. It's one of the abstractions I proposed
binding authors should take seriously[1], precisely because the way
applications need to work with frames doesn't match the 0MQ low level
API. More accurately, there is no single application semantic, there
are several.

So solution: make the language binding smarter.


[1] http://www.zeromq.org/topics:binding-abstractions

More information about the zeromq-dev mailing list