[zeromq-dev] 3.x zmq_msg_t change proposal
Martin Sustrik
sustrik at 250bpm.com
Fri Oct 28 08:38:43 CEST 2011
Hi Chuck,
> While thinking through a few scenarios with DEALER/ROUTER (and
> XREQ/XREP) in 0mq 3.0, it occurred to me that it doesn't make a lot
> of sense for us to test the *socket* to see if a message part is a
> label or not. The zmq_msg_t structure already has this information.
The problem is with zmq_send (void*, size_t, int) and zmq_recv (void*,
size_t, int) There's no way to return the ancillary data using these
functions.
I wanted to avoid POSIX-like ancillary data:
http://rfc-ref.org/RFC-TEXTS/3542/chapter20.html
If you are familiar with that API, you can see it's much more complex
that current 0MQ's getsockopt() API.
In short, you can implement access to message flags via message object,
however, the old way of accessing it is still necessary.
One additional concern: The change is not backward compatible. Current
implementation clears the flags when receiving a message part. Ie. when
you re-send it, it behaves like a separate message. It would be nice to
get rid of this behaviour, however, you need a consensus of users on the
backward incompatible change.
Martin
More information about the zeromq-dev
mailing list