Apache Camel for Servicemix Mediation Router

Apache Camel preferred to use as EIP and mediation router for Apache Servicemix 4.

To make bundle of camel context as EIP as well as mediation router, by:

Configuring camel-context.xml

We can use Java DSL or Spring XML-based syntax for specifying routes and will probably support things like a Groovy DSL in the future as well. If you look at the src/main/resources/camel-context.xml file inside the tutorial-camel-su project, you will see how the Maven archetype already generates an example of the XML syntax.

To use Java DSL, we change this file to point to the package that will contain our RouteBuilder classes. When the SU is started, all RouteBuilder classes will be located and the routes in there will be activated.

<beans ...>

<camelContext id=”camel” xmlns=”http://activemq.apache.org/camel/schema/spring”&gt;




To use Spring configuration, we can use something like

<beans …>

<camelContext id=”camel” xmlns=”http://activemq.apache.org/camel/schema/spring”&gt;


<from uri=”file:/env/sandbox/file-from” />

<to uri=”file:/env/sandbox/file-to” />





About this entry