Versions Compared

Key

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

To enable the router to do something more interesting than simply connecting a consumer endpoint to a producer endpoint, you can add processors to your route. A processor is a command you can insert into a routing rule to perform arbitrary processing of messages that flow through the rule.

Processor

Definition

aggregate

Creates an aggregator, which combines multiple incoming exchanges into a single exchange.

aop

Will use Aspect Oriented Programming (AOP) to do work before and after a specified sub-route

bean

Process the current exchange by invoking a method on a Java object (or bean)

choice

Selects a particular sub-route based on the exchange content, using when and otherwise clauses.

convertBodyTo

Converts the IN message to the specified type

delay

Delays the propagation of the exchange to the latter part of the route.

doTry

Creates a try/catch block for handling exceptions, using doCatch, doFinally, and end clauses.

enrich

Will combine the current exchange with data requested from a specified producer endpoint URI.

filter

Uses a predicate expression to filter incoming exchanges.

inOnly

This can either set the current exchange’s MEP to InOnly (if no arguments provided) or sends the exchange as an InOnly to the specified endpoint(s).

inOut

Either sets the current exchange’s MEP to InOut (if no arguments provided) or sends the exchange as an InOut to the specified endpoint(s).

loadBalance

Implements a load balancing process over a set of endpoints

log

Will log an error message to the console

loop

Repeatedly resends each exchange to the latter part of the route.

marshal

In preparation for sending over a particular transport protocol, it performs a transformation into a low-level or binary format using the specified data format.

multicast

Multicasts the current exchange to multiple destinations, where each destination gets its own copy of the exchange.

onCompletion

Defines a sub-route that gets executed after the main route has completed

onException

Defines a sub-route that gets executed whenever the specified exception occurs.

pipeline

Sends the exchange to a set of endpoints, where the output of one endpoint becomes the input of the next.

pollEnrich

Combines the current exchange with data that has been polled from a consumer endpoint URI.

process

Will execute a custom processor on the current exchange.

recipientList

Sends the exchange to a list of recipients that is calculated at runtime

removeHeader

Removes the specified header from the exchange’s IN message.

removeHeaders

Will remove the headers matching a specified pattern from the exchange’s IN message. This pattern can have the form “prefix\*”. In that situation, it matches every name starting with prefix.

removeProperty

Removes the specified exchange property from the exchange.

removeProperties

This will remove the properties matching the specified pattern from the exchange. It will accept a comma separated list of 1 or more strings as arguments.

resequence

Re-orders incoming exchanges on the basis of a specified comparator operation. It supports modes of either batch or stream mode.

rollback

Marks the current transaction for rollback onl

routingSlip

Will route the exchange through a dynamically constructed pipeline based on the list of endpoint URIs extracted from a slip header.

sample

This will create a sampling throttle that will allow us to extract a sample of exchanges from the traffic on a route.

setBody

Sets the message body of the exchange’s IN message.