[zeromq-dev] XPub welcome message and manual subscriptions

Arnaud Kapp kapp.arno at gmail.com
Wed Nov 26 16:39:34 CET 2014


This looks like a nice addition. I have one (little) problem with the
"welcome message" feature. If I read correctly, the topic for
receiving welcome message is "W". I think this is too short and too

 Maybe we could use some "internal-looking" name, something like
"__zmq_xpub_welcome" to make sure subscribing to welcome messages wont
enable other unwanted subscriptions.
This is because, correct me if i'm wrong, subscribing to "W" will
enable subscriptions for "Woohoo" or stuff like this).


On Wed, Nov 26, 2014 at 2:30 PM, Doron Somech <somdoron at gmail.com> wrote:
> Hi All,
> Just want to let you know and have a discussion on two features (two
> solutions to problems) that I have just added to zeromq:
> Manual Subscriptions:
> Publisher can be configured to manual mode, with manual mode subscriptions
> send from the client are not added automatically (nor unsubscriptions) and
> user must call set socket option with ZMQ_SUBSCRIBE on the publisher side to
> confirm them.
> The idea is that now subscriptions can be confirmed according to
> credentials, another use is to actually use a token for the subscription and
> the publisher will translate the token to one or more topics. For the second
> use the subscriber side must be of type xsub to avoid filtering messages on
> the client side.
> You can take a look at the test for usage:
> https://github.com/zeromq/libzmq/blob/master/tests/test_xpub_manual.cpp.
> Welcome message:
> Publisher can be configured to send welcome message when subscriber is
> attached.
> This solves the problem of not knowing if the connect action succeed, after
> connecting we wait for X seconds for a welcome message, if not arrived we
> know the publisher is down.
> I know this can also be solved with heartbeat but then you have to wait up
> to the heartbeat interval (and probably double the interval to make sure).
> Another nice use it to find the closest publisher, if I have multiple
> publishers around the world client can try to connect to all, the first one
> to answer with welcome is probably the closest one (alternative to geodns).
> When using the welcome feature the client must subscribe for the welcome
> message before trying to connect and server must use xpub, poll for incoming
> subscriptions and read them(subscriptions can be ignored).
> You can take a look at the test for usage:
> https://github.com/zeromq/libzmq/blob/master/tests/test_xpub_welcome_msg.cpp
> Regards,
> Doron
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Kapp Arnaud - Xaqq

More information about the zeromq-dev mailing list