[zeromq-dev] Router to router delay
Bjorn Reese
breese at mail1.stofanet.dk
Tue Jul 31 12:07:35 CEST 2012
On 2012-07-28 12:52, Bjorn Reese wrote:
> 2. Let zmq_send() return EAGAIN until the identity has been exchanged.
>
> 3. Add an event to notify the application that the identity has been
> exchanged (e.g. via the new zmq_ctx_monitor_event() functionality.)
While delving deeper into this problem, I discovered that the
ZMQ_ROUTER_BEHAVIOR option is more or less what I am looking for.
If this option is enabled, the call to zmq_send() will block until the
identity has been exchanged, thus making the sleep() superfluous. If
zmq_send() is called with ZMQ_DONTWAIT, it will return EAGAIN, which is
exactly as I requested in #2 above.
In the non-blocking case it may still be a good idea to receive an
event when the identity has been exchanged, so I will look further
into that.
More information about the zeromq-dev
mailing list