[zeromq-dev] how to know how many packets/bytes passed through a ZMQ proxy
luca.boccassi at gmail.com
Fri Sep 1 19:58:41 CEST 2017
On Fri, 2017-09-01 at 19:51 +0200, Francesco wrote:
> Hi Luca,
> Which capture socket feature sorry?
> Do you mean the zmq socket monitor
> (http://api.zeromq.org/4-2:zmq-socket-monitor) ? In this case I don't
> know how to get notified about packets/bytes through that
> (I'm using it to keep track of subscribers to my PUB sockets though)
The third parameter to zmq_proxy: http://api.zeromq.org/4-2:zmq-proxy
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.
> 2017-09-01 19:40 GMT+02:00 Luca Boccassi <luca.boccassi at gmail.com>:
> > On Fri, 2017-09-01 at 17:39 +0200, Francesco wrote:
> > > Hi all,
> > >
> > > Is it possible to know (using the steerable proxy control socket
> > > perhaps?) the number of packets/bytes passed through a ZMQ proxy?
> > >
> > > Thanks,
> > > Francesco
> > Hi,
> > No, but it should be easy to implement it in your application using
> > the
> > capture socket feature.
> > --
> > Kind regards,
> > Luca Boccassi
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the zeromq-dev