...
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 get started using the Maven Archetypes, in particular the 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 \ -DgroupId=your.group.id \ -DartifactId=your.artifact.id \ -Dversion=your-version |
Once you've customized the service unit, simply install the SU:
Code Block |
---|
mvn install
|
Info | ||
---|---|---|
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.
|
Endpoint Configuration
The Camel configuration is defined in a camel-context.xml file:
Code Block | ||||
---|---|---|---|---|
| ||||
<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.
...
For more details see the Camel Example.
Cookbook recipes
Children Display | ||||
---|---|---|---|---|
|