Route Editor Patterns

Components

Table 26, “Components” lists the components available from the route editor’s palette.

Table 26. Components

IconNameUse

endpoint

Generic

Provides access to the Select component wizard from which to select any of the supported Camel connector components, including those listed in the Palette.

bean

Bean

Binds beans to Camel message exchanges

log

Log

Creates log messages using the Simple language

process

Process

Process the message using a custom processor


Routing

Table 27, “Message Routing” describe the routing patterns available from the route editor palette.

Table 27. Message Routing

IconNameUse

aggregate

Aggregate

Aggregates many messages into a single message

choice

Choice

Routes messages based on a series of predicates. (This is one of three components that make up a content-based router.)

filter

Filter

Filters messages before passing them to a resource

filter

Hystrix

Lets an application integrate with Netflix Hystrix, which can provide a circuit breaker in Camel routes

idempotentConsumer

Idempotent Consumer

Filters out duplicate messages

loadBalance

Load Balance

Balances message processing among a number of nodes

multicast

Multicast

Routes a message to a number of endpoints

generic

Otherwise

Route to be executed when all other choices evaluate to false. (This is one of three components that make up a content-based router.)

pipeline

Pipeline

Executes a sequence of processors in order

recipientList

Recipient List

Routes messages to a number of dynamically specified recipients

resequence

Resequence

Resequences messages based on an expression

route

Route

Contains all elements that make up an individual route in a routing context

routingSlip

Routing Slip

Routes a message through a series of steps that are determined at runtime

sort

Sort

Sorts the contents of the message

split

Split

Splits a message into pieces that can processed separately

generic

When

Triggers a route when an expression evaluates to true. (This is one of three components that make up a content-based router.)

wireTap

Wire Tap

Routes a copy of a message to a secondary destination while passing the original message to the actual recipient


Control flow

Table 28, “Control flow” describes the control flow patterns available from the route editor palette.

Table 28. Control flow

IconNameUse

generic

Do Catch

Catches exceptions as part of a try, catch, finally block

delay

Delay

Delays processing for a set length of time

generic

Do Finally

Node traversed when a try, catch, finally block exits

generic

Intercept

Intercepts messages at each step in the message flow

generic

Intercept From

Intercepts incoming messages

generic

Intercept Send To Endpoint

Intercepts messages sent to a specified endpoint

loop

Loop

Processes a message multiple times

generic

On Completion

Route to be executed when normal route processing completes

generic

On Exception

Route to be executed when an exception is thrown

rollback

Rollback

Forces a rollback of a transacted route by throwing RollbackExchangeException

throttle

Throttle

Controls the number of messages passed to the next node in a given time period

throwException

Throw Exception

Throws an exception

transacted

Transacted

Marks route as a transaction

generic

Do Try

Marks the beginning of a try, catch, finally block


Transformation

Table 29, “Transformation” describes the transformation patterns available from the route editor palette.

Table 29. Transformation

IconNameUse Case

convertBody

Convert Body To

Converts the message body to a form usable by the next endpoint

enrich

Enrich

Enriches a message with data retrieved by a producer from a secondary resource

inOnly

In Only

One way exchange pattern where no response is produced (Event Message pattern)

inOut

In OutMarks the exchange pattern for the route to request/reply

Exchange pattern where a response is produced

marshal

Marshal

Marshals data into a format for transmission over a transport or component

pollEnrich

Poll Enrich

Enriches messages with data retrieved from a polling consumer

removeHeader

Remove Header

Removes a named header from the message

removeHeaders

Remove Headers

Removes message headers whose name matches a specified pattern

removeProperty

Remove Property

Removes a named property from the message exchange

removeProperties

Remove Properties

Removes propeties from the message exchange that match a specified name pattern

convertBody

Set Body

Sets the contents of the message body

setExchangePattern

Set Exchange Pattern

Sets the exchange pattern for the route

setFaultBody

Set Fault Body

Sets the contents of a fault message body

setHeader

Set Header

Sets the value of a message header

setOutHeader

Set Out Header

Sets the value of a header on the outbound message

setProperty

Set Property

Sets a named property on the message exchange

transform

Transform

Transforms the message based on an expression

unmarshal

Unmarshal

Converts the message data from the wire into a bean that Apache Camel processors can consume


Miscellaneous

Table 30, “Miscellaneous” describes the patterns on the Miscellaneous section of the palette.

Table 30. Miscellaneous

IconNameUse

generic

Aop

Does processing before and after the route is completed. (This pattern is deprecated in Apache Camel.)

policy

Policy

Defines a policy the route will use

sample

Sample

Extract a sample of the exchanges passing through a route

stop

Stop

Stops processing of the current message

threads

Threads

Specifies that all steps after this node are processed asynchronously

validate

Validate

Validates a message based on an expression