[zeromq-dev] error handling? assert?

Martin Sustrik sustrik at fastmq.com
Wed Dec 17 14:14:46 CET 2008


> I'm writing a 0MQ communication adapter as a shared object library for a 
> CEP (Complex Event Processing) engine. When I'm working inside the CEP 
> engine, if I create two instances of my 0MQ adapter and pass them the 
> same 0MQ global exchange name, the 0MQ library crashes the host process 
> (which in this case is the CEP engine). Before the CEP engine crashes, 
> its start-up behavior has already been configured such that it creates 
> two instances my 0MQ adapter using the same global exchange name. So 
> when I try to restart the CEP engine, it crashes on start-up ... I get 
> stuck in a catch-22 situation when I need to start the engine in order 
> to reconfigure the 0MQ adapters, but the engine crashes on start-up 
> because the 0MQ adapters are causing exchange name collisions. The only 
> way to break out of this loop (as far as I know) is to temporarily 
> delete the shared object library so that the CEP engine cannot 
> dynamically load it during startup. I guess this is more of an annoyance 
> for the developer (me) rather than a production reliability issue ... 
> but strictly speaking, it means that my 0MQ adapter is not 
> fault-tolerant ... the user has to be very careful when working with it 
> inside the CEP engine.

I think there's some  misunderstanding involved in here.

Global exchange can exist at a single location, there's no such thing as 
distributed exchange. Thus the exchange X should be created once only.

I would suppose you want to create the exchange elsewhere and pass only 
it's name to the adapters. The adapters won't create the exchange (it 
exists elsewhere) just bind to it.

Anyway, it's hard to tell without understanding the actual use case. Can 
you elaborate a bit on dataflows you want to achieve (boxes & arrows 
style presumably)?


More information about the zeromq-dev mailing list