Hi Pieter, thank you for your response. Actually I do have a solution, but relies on undocumented behavior: I realized that subscription messages are sent out in alphabetical order, by setting up my XSUB sockets to subscribe to a UUID prefixed with a "late" alphabetical prefix I can get an idea as to when a given subscriber sent out all of its subscriptions to a XPUB socket (I coordinate subscriber/publisher awareness with router/dealer sockets).
This is obviously a hack but should work with TCP as long as I do not subscribe to additional prefixes. Is it planned to have optional identities for XSUB sockets in the future? It seems like a logical next step after the introduction of ZMQ_XPUB_VERBOSE. Best regards Stefan On Nov 28, 2012, at 11:24 AM, Pieter Hintjens <[email protected]> wrote: > On Wed, Nov 28, 2012 at 12:42 AM, Stefan Radomski > <[email protected]> wrote: > >> I would like to know the identity of the sockets subscribing to a XPUB >> socket. I already use ZMQ_XPUB_VERBOSE with the XPUB socket to see all >> subscriptions, but now I only know the number of subscribers and not their >> identities. > > Not possible; there is no concept of identities in PUB/SUB sockets in > version 3.x. > >> With the ROUTER / DEALER socket pairs, the actual message is always an >> envelope with the sending sockets identity as the first message, is there >> some way to achieve something similar for XPUB/XSUB socket pairs? > > You can use DEALER/ROUTER pairs and do the message distribution yourself. > > -Pieter > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
