[zeromq-dev] How to get client's identity
bharatdsomani at gmail.com
Wed Jul 20 07:39:00 CEST 2016
Can you point to any API/example which will facilitate the addition of
key-value (meta-data) pairs in the message sent from client?
I tried to search with respect to ZAP and found that it only facilitates
the type of authentication to be used. But I am not able to locate any API
which add/retrieve the key value pairs.
On Tue, Jul 19, 2016 at 7:17 PM, David Jelenc <david.jelenc at fri.uni-lj.si>
> Another option would also be to use ZAP to authenticate clients. Once a
> client is authenticated, key-value (meta-data) pairs are added to each
> message so you always know whom each message came from.
> On 19. 07. 2016 15:45, Diego Fons wrote:
>> 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
>> <mailto:bharatdsomani at gmail.com>> wrote:
>> 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,
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org <mailto:zeromq-dev at lists.zeromq.org>
>> 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 <mailto:diego.fons at intraway.com>
>> Visit our website at http://www.intraway.com <http://www.intraway.com/>
>> Proud to be an ISO 9001:2008 certified company
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
With warm regards,
M +91 7588877776
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev