[zeromq-dev] Broadcasting Requests
ph at imatix.com
Thu May 5 19:20:00 CEST 2011
On Thu, May 5, 2011 at 6:48 PM, Pieter Hintjens <ph at imatix.com> wrote:
> Should not be too difficult doing copy/paste of the xreq class. I'll
> give it a shot... hang on a second...
OK, I've made it. :) The socket type name is PATCH, which stands for
I've added it to the 2.x branch, in the 2.2 repository (since we're
not adding new functionality to 2.1).
You can check it out from the 2.2 repo here:
There's a test case in tests/test_patch.c.
The PATCH socket type works precisely like a PUB combined with a PULL.
In detail, it uses fair-queuing for input, and distribution for
There is one gotcha, the same as for PUB sockets, namely if you send
messages before the recipients are finished their async connection,
the messages will get lost.
Thus the test case stupidly does a sleep (1), I'm sure you can find
better ways to synchronize.
Let me know how it works, and we can try to get this into the libzmq 3.0 master.
More information about the zeromq-dev