[zeromq-dev] Newbie questions re HWM and Async/Sync io

Aaron Koolen-Bourke aaronkoolen at gmail.com
Mon Mar 21 09:15:31 CET 2016

Hi all.

Slowly getting my ZMQ evaluation application together but I've discovered a
couple of things I'm hoping have some as-yet undiscovered (to me) answers.

I was noticing that my message feeder was blocking at the HWM and latency
was taking a hit so I've been experimenting with different HWM values along
the pipeline. 2000, (workers*1000) and various things like that. However I
have noticed that sometimes I'll use a value at one point in the chain and
the whole program hangs. Everyone is blocked on waiting for messages. This
doesn't make obvious sense to me.  NOTE: I'm waiting for a start signal
before any messages are sent so I'm not setting the HWM "mid action".

Is there any info on why it might hang and how to avoid it? I'm worried
that it's not deterministic with value and could just happen in a real

Secondly I've noticed that when I try and write something like a worker in
the "recommended way" by using ZMQ messages for all communication -
messages, start, stop etc. I get to the point where I need to both receive
some data on a socket, and get a command that signals I should cleanup and
exit my thread (I'm using CZMQ actors).

Thing is, from what I can tell I then need to move to polling and not
blocking receives, which not only keeps the thread busy looping, but seems
to be quite expensive (There seems to be a sleep timer in there or some
such). This just kills performance. Is there any support for a completely
event driven system in ZMQ/CZMQ?

Many thanks

CZMQ, ZMQ 4.1.4, Windows
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160321/88493886/attachment.htm>

More information about the zeromq-dev mailing list