Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

ServiceMix Camel

The servicemix-camel component provides support for using Apache Camel to provide a full set of Enterprise Integration Patterns and flexible routing and transformation in both Java code or Spring XML to route services on the Normalized Message Router.

For more background you might wanna see the comparison of ServiceMix EIP and Camel or how Camel works with JBI endpoints.

Maven Archetype

You can create a Camel service unit using servicemix-camel-service-unit maven archetype:

Code Block
mvn archetype:create \
  -DarchetypeGroupId=org.apache.servicemix.tooling \
  -DarchetypeArtifactId=servicemix-camel-service-unit \
  -DarchetypeVersion=2010.01 \ \ \

Once you've customized the service unit, simply install the SU:

Code Block
mvn install

Remember that to be deployable in ServiceMix, the ServiceUnit has to be embedded in a Service Assembly: only the Service Assembly zip file can be deployed in ServiceMix.
To add your SU in a SA, you need to define it in the dependency sets:

Code Block

Endpoint Configuration

The Camel configuration is defined in a camel-context.xml file:

Code Block
  <camelContext id="camel" xmlns="">
      <from uri="jbi:A" />
      <to uri="jbi:B" />


There is an example in the samples area which creates a Camel Service Unit and puts it into a Service Assembly for deploying a some Camel routes and EIP patterns in JBI.

You can find the example in the servicemix/samples/camel area.

For more details see the Camel Example.

Cookbook recipes

Children Display
pageservicemix-camel cookbook

See Also