[zeromq-dev] Using a ROUTER to direct messages to a new peer

MinRK benjaminrk at gmail.com
Thu Sep 29 01:32:51 CEST 2011


On Wed, Sep 28, 2011 at 16:19, Pieter Hintjens <ph at imatix.com> wrote:

> On Wed, Sep 28, 2011 at 6:14 PM, MinRK <benjaminrk at gmail.com> wrote:
>
> > No, ROUTER sockets in 3.0 are identical to 2.1 - they do not use LABELs
> at
> > all.
>
> /me confused, you're right. It's XPUB/XSUB that use labels...
>

as does XREP.  I think this is a common point of confusion for developers
moving from 2.1 to 3.0.

In 2.1: ROUTER/DEALER == XREP/XREQ

In 3.0 ROUTER/DEALER == 2.1-ROUTER/DEALER, but XREP/XREQ != ROUTER/DEALER

These 2.1 sockets continue to exist in 3.0 as ROUTER/DEALER, and behave in
the same way - if you had a ROUTER/DEALER or XREP/XREQ app in 2.1, it should
work just fine under the ROUTER/DEALER name in 3.0 with no changes (this has
proven true for IPython), so ROUTER/DEALER are safe transitional socket
types, but XREQ/XREP are not.

XREQ/XREP have been changed in 3.0 to use the new LABEL prefix stuff, so you
have to make changes in order to support it.

In IPython we bulk replaced XREP/XREQ to ROUTER/DEALER, even in places where
the XREP/XREQ roles are more appropriate.  This means IPython works fine on
2.1 and 3.0, with no changes.  Once 3.0 (and PyZMQ's support for LABELs) is
stable, we will revisit our 0MQ code, to be aware of the changes involved in
the LABEL prefix, and then address which sockets should really be
DEALER/ROUTER, and which should be XREP/XREQ.

-MinRK


> -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: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110928/19ffb937/attachment.htm>


More information about the zeromq-dev mailing list