[zeromq-dev] zeromq, abort(), and high reliability environments

Michel Pelletier pelletier.michel at gmail.com
Tue Aug 12 03:14:40 CEST 2014

On Mon, Aug 11, 2014 at 5:15 PM, Dylan Cali <calid1984 at gmail.com> wrote:
>> Must not throw an assertion there. An exception in the highlevel
>> bindings (if the language has any) could be ok. That's a matter of
>> taste and language style.
> The problem with assertions/aborts from a user's perspective is that
> they cannot be caught like a 'real' Exception.  So, even with the jzmq
> bindings there are some situations (e.g. out of file descriptors)
> where libzmq will abort and take an entire Java application with it,
> giving it no chance for cleanup/recovery.

The situations where 0mq asserts cannot be caught anyway, because they
occur in the background thread.  There is no "caller" to raise an
exception into.  As Thomas pointed out, it is unlikely that the
situation is recoverable anyway.  The only simple thing 0mq can do is
log and abort.

> My users say they don't feel comfortable using zeromq (or a client
> library that uses zeromq), in a high reliability application because
> of the possibility it will abort.

That possibility always exists and their sense of comfort is an
illusion whether you use 0mq or not.  There are many internal and
external reasons for systems to fail.  0mq aborting may actually be
one of the least probable terminal events to occur in your


More information about the zeromq-dev mailing list