[zeromq-dev] How to get client's identity

Diego Fons diego.fons at intraway.com
Tue Jul 19 15:45:52 CEST 2016


ZMQ_IDENTITY is used only with DEALER socket. You can not retrive client
information with PUSH/PULL sockets (they are not implemented for this).

You can:
1) Re-implement your application to use DEALER/ROUTER or
2) Implement an abstraction layer that provides client identification (ie.
build your own protocol).

I'd choose the first one, but I don't know the main purpose of the


On Tue, Jul 19, 2016 at 9:31 AM, Bharat Somani <bharatdsomani at gmail.com>

> Hi All,
> I have a process A which is creating ZMQ_PULL type of socket and bind on
> some port.
> Now I have process B, C, D (all on same system) which all creates ZMQ_PUSH
> types of sockets in each process respectively and connects to the port on
> same system on which process A is bind to.
> In process A I am using API zmq_msg_recv() for receiving the messages. Now
> I want to identify the process (A or B or C) from which that message is
> received.
> is there any way to know which process has sent this message?
> I tried to set the ZMQ_IDENTITY in client processes (B,C & D) but dont
> know how to get the identity from received message on the server process A
> Any pointer in this regard?
> --
> With warm regards,
> Bharat
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Diego Andrés Fons
Intraway Corp.
Solution Developer
AR Office: +54 (11) 6040 4000
US Office: +1 (516) 620 3890
Email: diego.fons at intraway.com

Visit our website at http://www.intraway.com
Proud to be an ISO 9001:2008 certified company
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160719/26f6b604/attachment.htm>

More information about the zeromq-dev mailing list