O'Reilly logo

Mastering Apache Camel by Jean-Baptiste Onofré

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Message Routing

These EIPs are the core routing patterns. It's mostly where Camel provides specific syntax to handle routing.

The Content Based Router EIP

The Content Based Router EIP is a special case of the Message Router EIP.

As we've seen previously, the Message Router EIP is a generic routing EIP defining a conditional routing on the message.

The Content Based Router EIP is used in cases where the condition is based on the content of the body of the message itself. In the Message Router example, the condition was on the extension of the consumed files.

Here, to illustrate the Content Based Router EIP, we create an example that will route the files depending on an XPath predicate in the body of the message.

We create the following route.xml Blueprint ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required