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:
mvn archetype:create \ -DarchetypeGroupId=org.apache.servicemix.tooling \ -DarchetypeArtifactId=servicemix-camel-service-unit \ -DarchetypeVersion=2010.01 \ -DgroupId=your.group.id \ -DartifactId=your.artifact.id \ -Dversion=your-version
Endpoint Configuration
The Camel configuration is defined in a camel-context.xml file:
<beans> <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring"> <route> <from uri="jbi:A" /> <to uri="jbi:B" /> </route> </camelContext> </beans>
Example
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
- Order File Processing — use a Camel Processor for enriching XML messages