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 ...

Get Mastering Apache Camel now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.