camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoni Mylka <antoni.my...@gmail.com>
Subject direct-vm in OSGI
Date Sat, 02 Mar 2013 20:58:39 GMT
Hi,

I've been investigating an issue in our application. It works on Karaf, 
uses Blueprint and has a number of bundles that start Camel contexts. We 
use direct-vm endpoints to send messages between contexts residing in 
different bundles and use karaf start levels to enforce startup ordering.

The problem is that most of the time the direct-vm endpoints work, but 
sometimes they don't. At startup, when the sending bundle sends a 
message we sometimes get an exception saying that no consumers are 
available on the endpoint. It looks like a race condition.

After some investigation two questions arose:

1. Bundle Start, Blueprint Start, Camel start are done synchronously. 
With start levels, the bundles on the higher level will start when all 
camel contexts from all bundles on the previous level have been started. 
Can assume that in my implementation? How do Aries and camel-blueprint 
work in this respect?

2. If the above is true, then are direct-vm endpoints safe for 
inter-bundle communication? Maybe they are a completely bad idea. If the 
above is false, then I'd need some solution that would wait until 
consumers become available. Can camel-osgi endpoints do that?

Antoni Myłka
antoni.mylka@gmail.com



Mime
View raw message