[zeromq-dev] Socket identities with subscription messages

Pieter Hintjens ph at imatix.com
Wed Nov 28 11:24:40 CET 2012

On Wed, Nov 28, 2012 at 12:42 AM, Stefan Radomski
<radomski at tk.informatik.tu-darmstadt.de> 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.


More information about the zeromq-dev mailing list