[zeromq-dev] Advanced request/reply broker pattern
Zachary Turner
divisortheory at gmail.com
Mon Aug 22 20:07:46 CEST 2011
Ahh, that makes sense. I have read much of the guide, but I guess I just
missed that part.
On Mon, Aug 22, 2011 at 10:58 AM, Pieter Hintjens <ph at imatix.com> wrote:
> On Mon, Aug 22, 2011 at 7:25 PM, Zachary Turner <divisortheory at gmail.com>
> wrote:
>
> > The part that's confusing me is this: Let's say I have one ROUTER socket
> in
> > my server connected to many DEALER sockets on my clients. We'll number
> my
> > clients from 1-10. Now suppose my broker decides that it needs to send a
> > message to client #7. How does it do this without ZMQ_IDENTITY?
>
> ZMQ_IDENTITY sets the identity to a fixed, preknown value. However you
> don't need that. The DEALER socket will generate a unique identity
> when it connects to the ROUTER socket, and the ROUTER will get that
> unique identity on all incoming messages. Thus, you always initiate a
> dialog with a request from DEALER to ROUTER, with 0..n replies back
> from ROUTER to DEALER.
>
> This is actually explained in the Guide, with examples.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110822/56853355/attachment-0001.htm
More information about the zeromq-dev
mailing list