Hello Mario, Thanks for you reply. By pending messages I meant messages that are not yet consumed by workers. I have a server-worker architecture. Server receives messages on zmq_stream socket, PUSHes them to a zmq_push socket. Workers PULLs from zmq_pull socket. My understanding is that if workers are not fast enough, messages will be queued up on zmq_push (or zmq_pull?) side of socket till the count reaches high water mark value. My intention is to periodically poll for this value if possible.
-- Thanks, Vikas. On Fri, Mar 4, 2016 at 11:13 AM, Mario Steinhoff <[email protected]> wrote: > I'd increase a counter everytime I do a recv() or send() call and then > send that to the TSDB from time to time. Not sure what you mean with > pending messages though. > > You could use a simple integer counter but there also exist full-blown > metrics library with counters, gauges, etc. > > On Fri, 4 Mar 2016 at 19:58, Vikas Kumar <[email protected]> wrote: > >> Hello ZeroMQ devs and users, >> >> I am trying to add some instrumentation in my code so it starts sending >> stats to some time series database. Basically from a socket pair what I'm >> interested in are: >> 1. Number of messages received every minute >> 2. Number of messages sent to worker threads >> 3. Count of pending messages >> >> I thought this is a common problem and there would be an existing >> pattern, but couldn't find anything online. What do you do to collect stats >> from zmq sockets? >> >> Thanks for your help. >> >> -- >> Vikas. >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
