Red Hat Training

A Red Hat training course is available for Red Hat Fuse

Chapter 14. EL


The Unified Expression Language (EL) was originally specified as part of the JSP 2.1 standard (JSR-245), but it is now available as a standalone language. Apache Camel integrates with JUEL (, which is an open source implementation of the EL language.

Adding JUEL package

To use EL in your routes you need to add a dependency on camel-juel to your project as shown in Example 14.1, “Adding the camel-juel dependency”.

Example 14.1. Adding the camel-juel dependency

<!-- Maven POM File -->


Static import

To use the el() static method in your application code, include the following import statement in your Java source files:
import static org.apache.camel.language.juel.JuelExpression.el;


Table 14.1, “EL variables” lists the variables that are accessible when using EL.

Table 14.1. EL variables

exchange org.apache.camel.Exchange The current Exchange
in org.apache.camel.Message The IN message
out org.apache.camel.Message The OUT message


Example 14.2, “Routes using EL” shows two routes that use EL.

Example 14.2. Routes using EL

    <from uri="seda:foo"/>
      <language language="el">${ == 'bar'}</language>
      <to uri="seda:bar"/>
    <from uri="seda:foo2"/>
      <language language="el">${in.headers['My Header'] == 'bar'}</language>
      <to uri="seda:bar"/>