Apache Camel forums can now be viewed using Nabble again

Nabble, the free mailing list web forum is used by many users and it now works again with Apache Camel.

The problem was that since Apache Camel was graduated as a Top Level Project, we had to change the URIs to reflect this change. This change is now also done by the people from Nabble. 

Check out the forums using Nabble.


Free FUSE screencasts - How to use Apache Camel in FUSE ESB 4 using OSGi

Fellow colleague Adrian Trenaman have been busy lately with both live tutorials and screencasts how to use FUSE ESB 4.0, that is the new OSGi powered ESB platform.

I enjoyed watching his screencasts (click FUSE training videos, they are in the bottom) and encourage you to take a look as well. If you haven't touched OSGi, JBI or Camel and wondering how they can integrate seamless in an Enterprise Platform then its a quick win to watch these videos.

The is a series of screencasts:
- Building, Installing and Running FUSE ESB
- Deploying a POJO into FUSE ESB
- Deploying a Web Service into FUSE ESB
- Deploying an Enterprise Integration Pattern into FUSE ESB (using FUSE MR / Apache Camel)
- Deploying a JBI Component into FUSE ESB

Thanks Adrian for doing these fantastic videos. Keep up the good work.


Apache Camel 1.6.0 released

As Jonathan already announced on his blog. Apache Camel 1.6.0 is released.

It marks a corner stone here, as its the first release since Apache Camel became top level project at Apache. 

We decided to keep the old URI syntax for the Camel XSD schemas so you should be able to upgrade without changing any URL's. The old link will redirect to the new top level location.

Originally we planned to do a 1.5.1 release based on bug fixes and a few improvements, but as Apache Camel is very much community driven, we good so many good ideas and feedback from the community what to get in, that the release contains about 170 tickets. So we decided that its should be a new release, hence the 1.6.0 version.

If I should highlight one important fix, that is the exception clauses now uses a better strategy to trigger when a given exception is thrown. Now the strategy is to look into the entire exception hierarchy starting from the bottom and recurring up the tree. This allows you to catch nested exceptions as well. More information here.

I expect the binaries to be pushed into the central mavens soon, if not already there.

As always thanks to the community and Hadrian for doing the actual releases.


Apache Camel and using compound predicates in routes

While reading a very a nice post by Roger Searjeant's on using Apache Camel in the health care space, and rocking to AC DC's new album Black Ice, got me on the track for the topic of this blog post.

How to use compound predicates in Apache Camel.

Roger is starting to grok Camel. And yes I admit it can take a little time to get the feeling and hang of it, but then you really get these "AHA/this is so cool" experiences. 

Roger wants to do content based routing, that is a very common EIP pattern to use. And Camel have first class support for this using its strong Predicate and Expression types. 

Roger wants to test if his HL7 message is either a ORM message type and the trigger event is 001. 

An example:

The problem is how to express the AND in the compound predicate?

Camel has support for combining predicate using all kind of binary operators in its: org.apache.camel.builder.PredicateBuilder class.

As the fluent builder can get a bit complex I like to divide, so we define our predicates outside the route:

Predicate p1 = header("hl7.msh.messageType").isEqualTo("ORM"):
Predicate p2 = header("hl7.msh.triggerEvent").isEqualTo("001");

Now we have our predicates and we can use the PredicateBuilder to create our compound predicate:

Predicate isOrm = PredicateBuilder.and(p1, p2);

And then we can refer to the isOrm predicate in our route.

So Rogers route can be written as:
        .when(isOrm).beanRef("hl7handler", "handleORM")
        .otherwise().beanRef("hl7handler", "badMessage")
Inlining the compound predicates can be a bit cumbersome as the Java compiler can get a bit spooked when the fluent builders get long and complex. That is why we encourage you to split your route such as above. It also enhances the readably as the route above is a kind of high level diagram without all the minor details of predicates and expressions.  


A nice tutorial on using Apache Camel in Apache ServiceMix

On the Camel user forum we get questions from time to time how to use Camel in ServiceMix. What was lacking before was a nice, short sample that demonstrates this.

Lars Heinemann from the Apache ServiceMix team took up the task and wrote a very nice tutorial.

This complements the exiting documentation very well.


How to use fuse releases when you can't wait for Apache releases

The release cycle for Apache sometimes tend to be a bit long. Apache Camel 1.5.0 was released in october 2008. If you cant wait for a new release, you can try out the fuse releases. They are free to use and requires no license fees or whatsoever.

Fuse releases have a constant and stable release cycle. We release a stable and proven version once a month. All releases is published in our open maven repository that is open for everyone to use. More information about why is here.

Lets try it out with an example. We use the part-five.zip from the lengthy tutorial as an example.

All we have to do is:
1) Setup maven repository location
2) Change version
3) Test

Ad 1)
First we need to add the fuse maven repository. So we insert these lines into our pom.xml file:

<name>FUSESource Repository</name>

<name>FUSESource Repository</name>

Ad 2)
Then we need to change the use the fuse releases, and that is very simple as you just need to change the version.

Apache Camel 1.5.0 should be replaced with
Apache CXF 2.1.3 should be replaced with

As we configure our pom.xml to use properties we just need to change this in a single location:


Ad 3)
Then we are ready to go. So we fire the maven command:
mvn clean install

And it should start downloading all the fuse artifacts and after a while run the unit tests.

Then we can fire up jetty with:
mvn jetty:run

And it should log on the console, the camel version:
Apache Camel (CamelContext:camel) started

Thats it


Open eHealth Integration Platform build on Apache Camel

Great news for the Camel community. 

Open eHealth Integration Platform is a brand new integration platform targeted at the health care industry. And its build on top of Apache Camel.

Quoting from the teaser:
The Open eHealth Integration Platform (IPF) is an extension of the Apache Camel routing and mediation engine. It has an application programming layer based on the Groovy programming language and comes with comprehensive support for message processing and connecting systems in the eHealth domain.

This is great news for the Camel community that Camel, yet again, is a proven itself to be a player in an ever growing open source world.

Having worked, in the past, as a IT consultant in the health care domain, this new project looks really promising. If you are in this space I recommend taking a look.

On a side note, the usage of Groovy for the DSL really shows the potential and power. Would be good to work together with them to bring their work with the Groovy DSL into the Apache Camel core.