[zeromq-dev] Broadcasting Requests

Fabien Ninoles fabien.ninoles at ubisoft.com
Thu May 5 19:25:22 CEST 2011


Thanks very much, what a service ! :)

What's the protocol for socket validation ?  Could I bind it to an XREP/XREQ ?

I will try to test it before the end of the week .  Coming back soon.

Thanks again,
Fabien

-----Message d'origine-----
De : zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] De la part de Pieter Hintjens
Envoyé : 5 mai 2011 13:20
À : ZeroMQ development list
Objet : Re: [zeromq-dev] Broadcasting Requests

Fabien,

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
"patchboard".

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:
https://github.com/zeromq/zeromq2-2/tree/patch-socket

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
output.

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.

-Pieter
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list