[zeromq-dev] Collecting stats from zmq sockets

Vikas Kumar kr.vikas at gmail.com
Fri Mar 4 21:01:26 CET 2016

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.


On Fri, Mar 4, 2016 at 11:13 AM, Mario Steinhoff <steinhoff.mario at gmail.com>

> 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 <kr.vikas at gmail.com> 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
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160304/6290d5cc/attachment.htm>

More information about the zeromq-dev mailing list