Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A processor is a node in a route that can access and modify the stream of exchanges passing through the route. Processors can accept either expression or predicate arguments that can modify their behavior. As an example, the local routing rule shown earlier on this page includes a Filter processor that takes an XPath() predicate as its passed argument.

Expressions and Predicates

Within our routing rules, we will use; Expressions (evaluating to strings or other data types), and predicates (evaluating to true or false) and these can occur frequently as arguments to the different processor types. For example, the following filter rule propagates input messages, only if the hello header is equal to the value of “helloworld”:

Code Block
languagejava
from("account:a"").filter(header("hello").isEqualTo("helloworld").to("acct:b"")