[zeromq-dev] Question Regarding XREP

Praveen Baratam praveen.baratam+zmq at gmail.com
Wed Dec 1 23:19:58 CET 2010

Dear Chuck,

Thanks for the quick reply.

Well if ever an Identity is reused, I guess the earlier socket connected
with that identity will be orphaned and all the messages will be routed to
the new socket with that ID. Effectively the session held by the old socket
will be hijacked by the new one.

Is this the expected behavior?

I know I am crossing the guidelines, but the behavior in this scenario is
important to us.

Lets say the Identity envelope of a message is "ABCD" and there are XREQs
with Identities such as "ABCD", "ABCD1", "ABCD2", "ABCD3" to the XREP in
question. Will the message reach all these sockets? Is this what you

Thanks for the patience.


Dr. Praveen

On Thu, Dec 2, 2010 at 3:19 AM, Chuck Remes <cremes.devlist at mac.com> wrote:

> On Dec 1, 2010, at 2:57 PM, Praveen Baratam wrote:
> > Hello All!
> >
> > I was just reading the Advanced Stuff chapter of the guide and found the
> XREP socket as a router pretty interesting.
> >
> > I just need a clarification that is not found anywhere in the guide or
> else where.
> >
> > XREP(Router) uses the identity envelope to route the message to the
> correct connected XREQ(Sink). What if there are more than one XREQs(Sinks)
> connected with the same identity? Will the message be sent to all of them or
> only one of them?
> >
> > Thanks in advance!
> Praveen,
> it isn't valid for multiple sockets to share the same identity. Make sure
> each one is unique. I usually append a 6-digit random number to the end of
> all of my socket identities when I override the default identity.
> cr
> _______________________________________________
> 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: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101202/46e5044d/attachment.htm>

More information about the zeromq-dev mailing list