[zeromq-dev] Advanced request/reply broker pattern

Zachary Turner divisortheory at gmail.com
Mon Aug 22 19:25:08 CEST 2011

On Mon, Aug 22, 2011 at 9:58 AM, Pieter Hintjens <ph at imatix.com> wrote:

> On Mon, Aug 22, 2011 at 6:52 PM, Zachary Turner <divisortheory at gmail.com>
> wrote:
> > I'm trying to model a situation that's a little similar to the
> Request-Reply
> > Broker in the zmq guide, but not quite.  I'm having trouble figuring out
> how
> > to model the scenario.
> There is actually a worked example that comes pretty close, it's the
> Inter-broker routing model of Ch3. Difference is your brokers are also
> workers.
> You should use DEALER sockets in your clients and ROUTER sockets in
> the servers. These will continue to work in all future versions of 0MQ
> (actually, merged into one single socket type in 4.0). Don't use
> ZMQ_IDENTITY, but you should not need to.

Hi Pieter, thanks for your response.

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?  Even the
zmq guide says that when sending messages through a ROUTER socket the
library will remove the first part of the message and use it to determine
which client to send it to.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110822/ff7277a3/attachment.htm>

More information about the zeromq-dev mailing list