[zeromq-dev] how to know how many packets/bytes passed through a ZMQ proxy
Luca Boccassi
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
> interface...
> (I'm using it to keep track of subscribers to my PUB sockets though)
>
> Thanks,
> Francesco
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
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
--
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/a9c8ec99/attachment.sig>
More information about the zeromq-dev
mailing list