Integration frameworks are getting more popular because you can easily integrate services or you can use them to integrate partial application parts to one application. To show you how easy it has become to integrate we did a 10 Minutes Hands-On at the It-Eye open space and this was the working result of that.
What is Apache Camel?
Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration.
Camel lets you create the Enterprise Integration Patterns to implement routing and mediation rules in either a Java based Domain Specific Language (or Fluent API), via Spring based Xml Configuration files or via the Scala DSL. This means you get smart completion of routing rules in your IDE whether in your Java, Scala or XML editor. source
What did we produce?
As always a POM file:
And of course we created some code:
And that’s it, but what does this example do.
It Starts with a direct endpoint that receives a message
t ads an id to the route, this can be used to manipulate the route with JMX
Logs the message
Converts the incoming message body to string
It creates a custom processor
Replaces the root element name
Sets a header
Logs the message
Dispatches the messages to a endpoint based on the header
As you can see it is very simple to create routes, you can use a lot of pre build components and if those are not sufficient enough you can create your own. And for those that don’t like to do this in java you can do the same in xml.