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

Francesco francesco.montorsi at gmail.com
Tue Sep 5 12:21:24 CEST 2017

Hi Luca,

I did add a new command to the ZMQ steerable proxy and it appears to
be quite self-contained. However that's my first patch to ZMQ so
please have a look and let me know if I should change something.
For now no changes to the documentation are attached: first I would
like to know if the way I coded the patch is fine or not, if the
naming is ok ("STATISTICS" command is ok?) etc

To keep track of this I opened a github issue:
Anyway I'm attaching the patch file also to this mail...


2017-09-01 20:35 GMT+02:00 Luca Boccassi <luca.boccassi at gmail.com>:
> 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
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libzmq_proxy_statistics.patch
Type: text/x-patch
Size: 16416 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170905/a3a857ba/attachment.bin>

More information about the zeromq-dev mailing list