Wednesday, December 10, 2008

RSS support in Camel

We've had Atom connectivity in Camel for a while now and so to not leave any RSS users out in the cold, I put in RSS support as well. We try to integrate with pretty much every messaging system in Camel after-all :)

Under the hood I'm using the ROME project. Its pretty much the standard Java framework for dealing with RSS feeds.

To consume from an RSS feed, just start your route like


Then you can do all sorts of neat stuff like,

Filtering entries

Only entries with Camel in the title will get through this filter.

filter().method("myFilterBean", "titleContainsCamel").

Merging multiple incoming feeds

Sometimes you may need to merge feeds from several different sources.


from("seda:temp").aggregate(new AggregateRssFeedCollection()).

Marshal between XML and ROME objects

Here we perform the same filtering as above but instead marshal to XML and use XPath.


For more info, check out the wiki documentation.

Wednesday, November 12, 2008

How do you use your Apache Camel?

The Apache Camel project has been growing by leaps and bounds lately it seems. Much of this growth has been driven by a vibrant community (many thanks to all users! :) ). Its typically hard though to know what kind of applications Camel is being used in. We don't have much visibility into the cool stuff people are doing with Camel. In particular, in would be nice to know what other applications are being used with Camel... eg. CMSs, DBs, ESBs, App Servers, web frameworks, other frameworks, etc etc

I've started a thread here trying to capture how folks are using Camel. Please, if you're a user of Camel, take a minute to share how it is being used on the thread or here. This will only help us make Camel better and more useful in the future. No confidential info allowed, of course ;)

Wednesday, November 5, 2008

Creating Apache Camel projects with m2eclipse

I just noticed today that Apache Camel shows up by default in the m2eclipse New Maven Project dialog. No extra fooling around is required anymore. Very cool!

This is by far the easiest way to get started with Apache Camel - you don't even have to leave your IDE.

Friday, October 31, 2008

Apache Camel 1.5.0 Released!

Several months and 266 fixes later (a new record!), the Apache Camel team is proud to present version 1.5.0!

Go ahead, take a look at the release notes and grab it here. Its still pretty fresh so it may take a few hours before the release propagates to all Apache download mirrors (try here otherwise).

Tuesday, October 14, 2008

Repeatable Maven Builds

A typical problem folks have with Maven seems to be getting repeatable builds. If you've encountered this, you know the pain: an older release needs to be built but now fails with the dreaded "Failed to resolve artifact" error. You can't really depend on most Maven repos to be there indefinitely. I'm sure repos like are pretty safe but AFAIK the maintainers are under no legal obligation to keep around the artifacts forever. You most likely DO have obligations to customers and thus need to ensure builds are repeatable.

You get repeatability for free when you use a repository manager like Nexus - it keeps downloaded artifacts around forever by default. If you don't want to use a repository manager, you're going to have to save those artifacts some other (manual) way. One approach would be to just tar up your local m2 repo after each release and store it somewhere safe (like in SVN). Of course, since local repos tend to get huge over time, you should always start from an empty local repo before a release.

Hope this helps.

Tuesday, October 7, 2008

Why drop Maven?

Recently I've noticed projects dropping Maven in favour of some other build tool... Apache Qpid comes to mind in this case. I'm wondering, is there a real good technical reason that folks do not like Maven? It has its quirks... but really, what tool doesn't? I've been using it for years now and like it better that any other build tool out there.

Friday, September 19, 2008

Nexus indices added for FUSE

I've added Nexus repository indices for the FUSE Maven repositories. You can find instructions on how to add these to your m2eclipse installation here.

Why should you care? Well, among many other things, this enables you:

1. Create new projects based on Camel archetypes
2. Search for classes in all FUSE artifacts
3. Add FUSE dependencies to your project's POM

Tuesday, September 9, 2008

Nexus config for Apache Camel

Some folks have been having issues getting all the Maven repositories set up properly in Nexus for Apache Camel. Here's my working Nexus config and settings.xml - hope it helps!

Nexus config
(admittedly polluted with repos from other projects...)


I found my Nexus config in /opt/sonatype-work/nexus/conf. I'm not sure what happens when you copy in a new Nexus config file so you should probably make a copy of the sonatype-work directory first :)

Thursday, September 4, 2008

I'm an Apache Camel committer!

Over the past few months I've been hacking away on various parts of Apache Camel. It was initially just for fun, but quickly turned into my day job :) With over 40 fixes contributed, the Camel team decided to vote me in as a committer!

This is my first committer status on any Apache project so its pretty exciting. I've traditionally been involved with closed source projects only.

Looking forward to more Camel hacking!

BTW for those who are interesting in contributing to the growing Camel project, Jamie posted a good guide to Apache process here.

Wednesday, August 27, 2008

Nexus == easy

I must admit, the Maven setup at work has me a bit spoiled. Direct LAN access to a bunch of Maven mirrors makes for some pretty fast builds. Problem is, when I go off site I have to suffer through slow builds again...

Thanks to Bruce I now have wicked fast builds off site too!! A local instance of Nexus is the answer. Seriously, go take a look at the steps Bruce posted. It took me like 30 minutes to setup and add about twenty mirrors - now thats freakin' easy.

Heres the best part (I'm building Apache Camel here with a clean local repo):

No mirroring
[INFO] Total time: 31 minutes 18 seconds

Custom internal mirrors
[INFO] Total time: 7 minutes 52 seconds

Nexus mirroring
[INFO] Total time: 3 minutes 3 seconds

Anyway, bottom line is that I'm impressed. Great work Maven guys!

Tuesday, August 26, 2008

Eclipse Templates for Apache Camel

If you didn't know already, Eclipse allows you to define custom templates for commonly used code snippets. Its a very neat feature for those of us who are memory challenged or don't like typing things twice!

I think that Apache Camel users could really benefit from having predefined templates for doing Camel routing. I also hear a lot of requests like "I have this Java DSL route, how do I do this in the Spring XML DSL?" so having both Java and XML templates for the same thing is essential.

You can find the templates I did up here & here. To import these browse to the template screens defined at:

Window -> Preferences -> Java -> Editor -> Templates
Window -> Preferences -> Web and XML -> XML Files -> Templates.

Once imported, you can type Ctrl + Space and then type 'camel' to search for the camel templates. You should see something like this in the Java and XML editors:

When you select, say a Content Based Router, you'll get a route something like this in the Java and XML editors:

The formatting was a bit wonky for these Eclipse templates so you might want to pretty up your routes before showing anyone else :)

Let me know what you think!