[zeromq-dev] [PATCH] Add msg_t::label flag

Fabien Ninoles fabien at tzone.org
Sat May 21 15:57:45 CEST 2011

----- Message d'origine -----
> +Bit 1 (LABEL): _This message part is not part of the original
> +message._ A value of 1 indicate a message part that weren't part of
> +the original stream.   They are used internally by the transport to
> +indicate, for example, the origin of a message.
> +
> +Bits 2-7: _Reserved_. Bits 1-7 are reserved for future expansion and 
> MUST be
>     set to zero.
> It should be explained how LABEL flag interacts with MORE flag. I would 
> propose something like this:
> 1. Labels always occur at the beginning of the message. If label appears 
> elsewhere in the message, the message is malformed.

In present use-case (routing), that's true.  Not so sure about future use-case but I can't tell why it couldn't be always as start neither.

> 2. Labels never have MORE flags set. Combination of LAVEL and MORE on 
> the same message part makes the message malformed.

Make it harder to implement queuing device and require the flag to be either exposed externally or to change the behavior of the ZMQ_RCVMORE getsockopt.  Also, mutually exclusive flags are usually a bad smell (mean they lack orthogonality).  So, -1 for me here.


More information about the zeromq-dev mailing list