[zeromq-dev] recvmsg deprecated

Pieter Hintjens ph at imatix.com
Wed May 15 16:52:02 CEST 2013


On Wed, May 15, 2013 at 4:35 PM, Andrew Hume <andrew at research.att.com> wrote:

> how do people use zmq_recv now? do they assume a packet size limit?
> and how can they tell if they lost data?

What you want are zmq_msg_send and zmq_msg_recv.

The zmq_send/zmq_recv functions were added to 0MQ/3.0 and broke the
API, causing a lot of pain. As you point out there's no way to know if
you lost data. In fact they work well for simple cases, but since then
we changed the rules about API changes:

* No changes to functions that are being used
* No reusing old names for new functionality
* Change by adding new functions and slowly deprecating old ones

In 3.0, zmq_send/recv took over the old names which were renamed to
zmq_sendmsg/zmq_recvmsg. Since this forced every application to
change, I took the chance of moving those to zmq_msg_send/recv to
create a consistent zmq_msg API.

We did discuss this extensively on the list.

Hope this helps.

-Pieter



More information about the zeromq-dev mailing list