Tuesday, March 10, 2009

On the question of 'ServiceMix vs Camel'

There was an interesting discussion on the ServiceMix users list on how to choose between implementing integration solutions using ServiceMix or camel; thought I'd post my contribution to that discussion here. ServiceMix should really be thought of as a container, that facilitates the deployment of JBI-based integration solutions and Camel-based solutions for enterprise integration. And, of course, ServiceMix 4 is an OSGi container, which extends the concept of what can be deployed - JBI service assemblies, spring configuration, OSGi bundles, etc.

The question really becomes "Should I use the ServiceMix JBI components (-eip, -file, -ftp, etc.) or should I just use camel components?" I think the decision around this will depend on whether the JBI architecture forms an important underpinning of your solution: if so, then it makes sense to use the JBI components. If, however, you have no desire to go down the pure JBI route, then you can choose to adopt either a pure Camel or a more blended approach.

As Chris Custine and Jean-Baptiste have both pointed out, Camel integrates very effectively with JBI, so you can get the best of both worlds. You might find that the JBI servicemix-ftp component is more robust than the camel-ftp component, and choose to use the former as part of a Camel route. Or, you might prefer the servicemix-eip Aggregator's persistence of state over that of the aggregator in Camel.

So: my advice is, in a nutshell, move forward embracing a blend of both JBI and camel components, and, consider 'ServiceMix' to be a container for both.

1 comment:

cmoulliard said...

You are right Adrian. Camel needs a n OSGI container offered by ServiceMix 4. So this question does not make sense today (ServiceMix <-> Camel). Some persons will argue that Camel can run in standalone or in a J2EE server but the services already offered by the OSGI server in term of maintenance, security, deployment, ... and those who will come in the future like clustering, loadbalancing reinforce the binome of ServiceMix + Camel.