[zeromq-dev] how to know how many packets/bytes passed through a ZMQ proxy

Luca Boccassi luca.boccassi at gmail.com
Fri Sep 1 20:35:32 CEST 2017


On Fri, 2017-09-01 at 20:18 +0200, Francesco wrote:
> 2017-09-01 19:58 GMT+02:00 Luca Boccassi <luca.boccassi at gmail.com>:
> > The third parameter to zmq_proxy: http://api.zeromq.org/4-2:zmq-pro
> > xy
> > 
> > If you pass a socket, all messages will be duplicated and sent to
> > it.
> > Then you can do all the measurements you need.
> > Note that they are shallow refcounted copies, so only the small
> > metadata is actually copied, not the payloads, so it's reasonably
> > fast.
> 
> Ok thanks, I can try that!
> Honestly however I think it would be nice to have an
> easier/more-optimized way to retrieve such kind of informations...
> maybe a message that is sent over a steerable proxy control socket
> (of
> type REQ/REP maybe) or a socket option to retrieve via
> zmq_get_socksockopt()
> 
> Thanks!
> 
> Francesco

A new steerable message sounds like a good idea, feel free to send a
PR!

Note that it probably should have an ON/OFF capability, as to avoid
performance penalties for users that are not interested in the feature.

-- 
Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170901/4cde4255/attachment.sig>


More information about the zeromq-dev mailing list