[zeromq-dev] error handling? assert?

Martin Sustrik sustrik at fastmq.com
Wed Dec 17 20:22:47 CET 2008


> Some background on the use of assertions in 0MQ...
> 
> We developed this technique in iMatix OpenAMQ but it's used widely.
> Asserts stay in production code.  They catch any internal
> inconsistency and guarantee that the application runs perfectly, or
> not at all.  It can be scary to think of production code with
> assertions but in fact it raises reliability quite dramatically
> because ambiguous cases can be cleared out.
> 
> AMQP uses a similar pattern to abort connections when there are
> errors, rather than trying to recover from errors.

Yup. This technique is called "fail-fast". You may find some info e.g. 
here: http://en.wikipedia.org/wiki/Failfast

Martin



More information about the zeromq-dev mailing list