Synchronous communication in Apache Camel between Camel Context's

365 views Asked by At

In the last project I was able to use direct:vm component, which is in my opinion the best component to resolve my task. Unfortunately now I can't use it because I'm limited to ServiceMix's Camel version, which is 2.6.0-fuse-00-00, so I've found Normalized Message Router (NMR). I've found information that NMR is asynchronous on default, but can be set as a synchronous by parameter synchronous. Is it still good sollution to use it instead of direct:vm component? I'm using it with enrich component and I didn't found any problems with that.

1

There are 1 answers

3
Adam Hawkes On

In an OSGi environment, each bundle is kept fairly separate from the others. The NMR component allows a bundle to expose a Camel route as a resource to other bundles in the container using this facility in ServiceMix. The direct-vm component wasn't introduced until Camel 2.10, so for your version the NMR component is the best fit. It is still considered lightweight, but more feature-rich than directly exposing the routes. It's still better than using the JBI technology, which should be considered legacy.