[zeromq-dev] ROUTER_BEHAVIOR set to 1 with Router->Router blocks when peer closes connection

Pieter Hintjens ph at imatix.com
Tue Nov 13 06:39:00 CET 2012


Hi Peter,

You're using the Freelance pattern, then? Nice.

There was a problem with the implementation of ROUTER_BEHAVIOR.
Internally, EAGAIN gets trapped and libzmq loops. This could not work.

The latest libzmq master and the 3.2 release candidate have changed to:

- return EHOSTUNREACH instead of EAGAIN (and this gets properly
returned to the caller)
- use ZMQ_ROUTER_MANDATORY as the option name (the old name(s) are
still provided for compatibility)

See https://github.com/zeromq/issues/tree/master/451 for an example.

-Piieter


On Tue, Nov 13, 2012 at 8:45 AM, Peter Friend <pfriend at gehrytech.com> wrote:
> I have a ROUTER->ROUTER working in python. Both sides explicitly set their
> identities. It is a queue->worker kind of setup, so instead of having a
> message drop when unroutable I want the EAGAIN. If I set ROUTER_BEHAVIOR to
> 1 in the queue process and kill the worker process (note that the worker
> connects to the queue), the send_multipart() call blocks. Is this expected
> behavior?
>
> Thanks,
>
> Peter
>
>
>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



More information about the zeromq-dev mailing list