LibraryToggle FramesPrintFeedback

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 node you can insert into a routing rule to perform arbitrary processing of messages that flow through the rule. Fuse Mediation Router provides a wide variety of different processors, as shown in Table 1.1.

Table 1.1. Apache Camel processors

XML DSLDescription
aggregateAggregator EIP: Creates an aggregator, which combines multiple incoming exchanges into a single exchange.
aopUse Aspect Oriented Programming (AOP) to do work before and after a specified sub-route. See Aspect Oriented Programming.
beanProcess the current exchange by invoking a method on a Java object (or bean). See Bean Integration.
choiceContent Based Router EIP: Selects a particular sub-route based on the exchange content, using when and otherwise clauses.
convertBodyToConverts the In message body to the specified type.
delayDelayer EIP: Delays the propagation of the exchange to the latter part of the route.
doTryCreates a try/catch block for handling exceptions, using doCatch, doFinally, and end clauses.
enrichContent Enricher EIP: Combines the current exchange with data requested from a specified producer endpoint URI.
filterMessage Filter EIP: Uses a predicate expression to filter incoming exchanges.
idempotentConsumerIdempotent Consumer EIP: Implements a strategy to suppress duplicate messages.
@inheritErrorHandlerBoolean option that can be used to disable the inherited error handler on a particular route node.
inOnlyEither sets the current exchange's MEP to InOnly (if no arguments) or sends the exchange as an InOnly to the specified endpoint(s).
inOutEither sets the current exchange's MEP to InOut (if no arguments) or sends the exchange as an InOut to the specified endpoint(s).
loadBalanceLoad Balancer EIP: Implements load balancing over a collection of endpoints.
logLogs a message to the console.
loopLoop EIP: Repeatedly resends each exchange to the latter part of the route.
@markRollbackOnly(Transactions) Marks the current transaction for rollback only (no exception is raised). This option is set as a boolean attribute on the rollback element.
@markRollbackOnlyLast(Transactions) If one or more transactions have previously been associated with this thread and then suspended, this command marks the latest transaction for rollback only (no exception is raised). This option is set as a boolean attribute on the rollback element.
marshalTransforms into a low-level or binary format using the specified data format, in preparation for sending over a particular transport protocol. See Marshalling and unmarshalling.
multicastMulticast EIP: Multicasts the current exchange to multiple destinations, where each destination gets its own copy of the exchange.
onCompletionDefines a sub-route that gets executed after the main route has completed. For conditional execution, use the onWhen sub-clause. Can also be defined on its own line (not in a route).
onExceptionDefines a sub-route that gets executed whenever the specified exception occurs. Usually not defined as part of a route.
pipelinePipes and Filters EIP: Sends the exchange to a series of endpoints, where the output of one endpoint becomes the input of the next endpoint. See also Pipeline Processing.
policyApply a policy to the current route (currently only used for transactional policies).
pollEnrichContent Enricher EIP: Combines the current exchange with data polled from a specified consumer endpoint URI.
processExecute a custom processor on the current exchange. See Custom processor.
recipientListRecipient List EIP: Sends the exchange to a list of recipients that is calculated at runtime (for example, based on the contents of a header).
removeHeaderRemoves the specified header from the exchange's In message.
removeHeadersRemoves the headers matching the specified pattern from the exchange's In message. The pattern can have the form, prefix*—in which case it matches every name starting with prefix—otherwise, it is interpreted as a regular expression.
removePropertyRemoves the specified exchange property from the exchange.
resequence

Resequencer EIP: Re-orders incoming exchanges on the basis of a specified comparotor operation. Supports a batch mode and a stream mode.

rollback(Transactions) Marks the current transaction for rollback only (also raising an exception, by default).
routingSlipRouting Slip EIP: Routes the exchange through a pipeline that is constructed dynamically, based on the list of endpoint URIs extracted from a slip header.
sampleCreates a sampling throttler, allowing you to extract a sample of exchanges from the traffic on a route.
setBodySets the message body of the exchange's In message.
setExchangePatternSets the current exchange's MEP to the specified value. See Message exchange patterns.
setHeaderSets the specified header in the exchange's In message.
setOutHeaderSets the specified header in the exchange's Out message.
setPropertySets the specified exchange property.
sortSorts the contents of the In message body (where a custom comparator can optionally be specified).
splitSplitter EIP: Splits the current exchange into a sequence of exchanges, where each split exchange contains a fragment of the original message body.
stopStops routing the current exchange and marks it as completed.
threadsCreates a thread pool for concurrent processing of the latter part of the route.
throttleThrottler EIP: Limit the flow rate to the specified level (exchanges per second).
throwExceptionThrow the specified Java exception.
toSend the exchange to one or more endpoints. See Pipeline Processing.
transactedCreate a Spring transaction scope that encloses the latter part of the route.
transformMessage Translator EIP: Copy the In message headers to the Out message headers and set the Out message body to the specified value.
unmarshalTransforms the In message body from a low-level or binary format to a high-level format, using the specified data format. See Marshalling and unmarshalling.
validateTakes a predicate expression to test whether the current message is valid. If the predicate returns false, throws a PredicateValidationException exception.
wireTapWire Tap EIP: Sends a copy of the current exchange to the specified wire tap URI, using the ExchangePattern.InOnly MEP.

Comments powered by Disqus
loading table of contents...