LibraryPrintFeedback

Enterprise Integration Pattern Reference

Version 2.1

March 2012
Trademark Disclaimer
Third Party Acknowledgements

Updated: 09 Oct 2012

Table of Contents

1. Route Editor Patterns
2. Endpoints
Endpoint — Act as either a message source or a message sink
Bean — Binds a bean to Camel message exchanges
Log — Creates log messages using the Simple language
Process — Process the message using a custom processor
3. Routing
Aggregate — Aggregates many messages into a single message
Choice — Routes messages based on a series of predicates
Dynamic Router — Routes messages based on rules specified by the recipients at start up
Filter — Filters messages before passing them to a resource
Idempotent Consumer — Filters out duplicate messages
Load Balance — Balances message processing among a number of nodes
Multicast — Routes a message to a number of endpoints
Otherwise — Route to be executed when all other choices evaluate to false
Pipeline — Executes a sequence of processors in order
Recipient List — Routes messages to a number of dynamically specified recipients
Resequence — Resequences messages based on an expression
Routing Slip — Routes a message through a series of steps that are determined at runtime
Sort — Sorts the contents of the message
Split — Sorts the contents of the message
When — Triggers a route when an expression evaluates to true
Wire Tap — Routes a copy of a message to a secondary destination while passing the original message to the actual recipient, or it creates a new message and passes that to the recipient.
4. Control Flow
Catch — Catches exceptions as part of a try, catch, finally block
Delay — Delays processing for a specified length of time
Finally — Node traversed when a try, catch, finally block exits
Intercept — Intercepts a message at each step in the route
Intercept From — Intercepts incoming messages
Intercept Send To Endpoint — Intercepts messages sent to an endpoint
Loop — Processes a message multiple times
On Completion — Route to be executed when normal route processing completes
On Exception — Route to be executed when an exception is thrown
Rollback — Forces a rollback of a route
Throttle — Controls the rate at which messages are passed to the next node in the route
Throw Exception — Throws an exception
Transacted — Marks a route as a transaction
Try — Marks the beginning of a Try, Catch, Finally block
5. Transformation
Convert Body — Converts the message body to a form usable by the next endpoint
Enrich — Enriches a message with data from a secondary resource
In Only — Marks the exchange pattern for the route to one way (Event Message pattern)
In Out — Marks the exchange pattern for the route to request/reply
Marshal — Marshals data into a specified format for transmission over a transport or component
Poll Enrich — Enriches messages with data retrieved from a polling consumer
Remove Header — Removes a named header from the message
Remove Headers — Removes message headers whose name matches a specified pattern
Remove Property — Removes a named property from the message exchange
Set Body — Sets the contents of the message body
Set Exchange Pattern — Sets the exchange pattern for the route
Set Fault Body — Sets the contents of a fault message's body
Set Header — Sets the value of a message header
Set Out Header — Sets the value of a header on the outbound message
Set Property — Sets a named property on the message exchange
Transform — Transforms the message based on an expression
Unmarshal — Converts the message data received from the wire into a format that Apache Camel processors can consume
6. Miscellaneous
AOP — Does processing before and/or after the route is completed
Policy — Defines a policy the route will use
Sampling — Extract a sample of the exchanges passing through a route
Stop — Stops the processing of the current message
Threads — Specifies that all steps after this node are processed asynchronously
Validate — Validates a message based on an expression
7. Route Icon

List of Figures

7.1. Route pattern

List of Tables

1.1. Endpoints
1.2. Message Routing
1.3. Control flow
1.4. Transformation
1.5. Miscellaneous
2.1. Endpoint Properties
2.2. Bean Properties
2.3. Log Properties
2.4. Process Properties
3.1. Aggregate Properties
3.2. Choice Properties
3.3. Dynamic Router Properties
3.4. Filter Properties
3.5. Idempotent Consumer Properties
3.6. Load Balance Properties
3.7. Failover Load Balance Properties
3.8. Custom Load Balance Properties
3.9. Sticky Load Balance Properties
3.10. Weighted Load Balance Properties
3.11. Multicast Properties
3.12. Otherwise Properties
3.13. Pipeline Properties
3.14. Recipient List Properties
3.15. Resequence Properties
3.16. batch-config Properties
3.17. stream-config Properties
3.18. Routing Slip Properties
3.19. Sort Properties
3.20. Split Properties
3.21. When Properties
3.22. Wire Tap Properties
4.1. Catch Properties
4.2. Delay Properties
4.3. Finally Properties
4.4. Intercept Properties
4.5. Intercept From Properties
4.6. Intercept Send To Endpoint Properties
4.7. Loop Properties
4.8. On Completion Properties
4.9. On Exception Properties
4.10. Redelivery Properties
4.11. Rollback Properties
4.12. Throttle Properties
4.13. Throw Exception Properties
4.14. Transacted Properties
4.15. Try Properties
5.1. Convert Body Properties
5.2. Enrich Properties
5.3. In Only Properties
5.4. In Out Properties
5.5. Marshal Properties
5.6. bindy Properties
5.7. castor Properties
5.8. crypto Properties
5.9. csv Properties
5.10. custom Properties
5.11. jaxb Properties
5.12. json Properties
5.13. pgp Properties
5.14. protobuf Properties
5.15. secureXML Properties
5.16. soapjaxb Properties
5.17. string Properties
5.18. XmlBeans Properties
5.19. zip Properties
5.20. Poll Enrich Properties
5.21. Remove Header Properties
5.22. Remove Headers Properties
5.23. Remove Property Properties
5.24. Set Body Properties
5.25. Set Exchange Pattern Properties
5.26. Set Fault Body Properties
5.27. Set Header Properties
5.28. Set Out Header Properties
5.29. Set Property Properties
5.30. Transform Properties
5.31. Unmarshal Properties
5.32. bindy Properties
5.33. castor Properties
5.34. crypto Properties
5.35. csv Properties
5.36. custom Properties
5.37. jaxb Properties
5.38. json Properties
5.39. pgp Properties
5.40. protobuf Properties
5.41. secureXML Properties
5.42. soapjaxb Properties
5.43. string Properties
5.44. tidyMarkup Properties
5.45. XmlBeans Properties
5.46. zip Properties
6.1. AOP Properties
6.2. Policy Properties
6.3. Sampling Properties
6.4. Stop Properties
6.5. Threads Properties
6.6. Validate Properties
7.1. Route Properties
Endpoint — Act as either a message source or a message sink
Bean — Binds a bean to Camel message exchanges
Log — Creates log messages using the Simple language
Process — Process the message using a custom processor
Aggregate — Aggregates many messages into a single message
Choice — Routes messages based on a series of predicates
Dynamic Router — Routes messages based on rules specified by the recipients at start up
Filter — Filters messages before passing them to a resource
Idempotent Consumer — Filters out duplicate messages
Load Balance — Balances message processing among a number of nodes
Multicast — Routes a message to a number of endpoints
Otherwise — Route to be executed when all other choices evaluate to false
Pipeline — Executes a sequence of processors in order
Recipient List — Routes messages to a number of dynamically specified recipients
Resequence — Resequences messages based on an expression
Routing Slip — Routes a message through a series of steps that are determined at runtime
Sort — Sorts the contents of the message
Split — Sorts the contents of the message
When — Triggers a route when an expression evaluates to true
Wire Tap — Routes a copy of a message to a secondary destination while passing the original message to the actual recipient, or it creates a new message and passes that to the recipient.

Name

Aggregate — Aggregates many messages into a single message

Properties

Table 3.1 describes the properties you can specify using the properties editor.

Table 3.1. Aggregate Properties

NameDescription
Correlation ExpressionSpecifies the expression used to correlate the messages that are aggregated.
languageSpecifies the expression language used to process the correlation expression.
Completion Size ExpressionSpecifies an expression used to determine when aggregation is complete based on the number of exchanges processed.
languageSpecifies the expression language used to process the completion size expression.
Completion PredicateSpecifies the expression used to determine when the aggregated message is complete based on it's contents.
languageSpecifies the expression language used to process the completion predicate expression.
Completion Timeout ExpressionSpecifies an expression used to determine when aggregation is complete based on the amount of time, in milliseconds, the aggregator has been inactive.
languageSpecifies the expression language used to process the completion timeout expression.
Strategy RefSpecifies a reference for looking up the AggregationStrategy in the registry.
Close Correlation Key On CompletionSpecifies the number of closed correlation keys stored in the cache used to determine if an exchange should be accepted.
Completion TimeoutSpecifies the amount of time, in milliseconds, the aggregator must be inactive to complete an aggregated message. The property cannot be used with Completion Interval.
Inherit Error HandlerSpecifies whether the node should use the error handler configured for the route. The default is Disabled.
Timeout Checker Executor Service RefSpecifies a reference for looking up the timeoutExecutorService to use for custom thread pool management when using one of the options: Completion Timeout, Completion Timeout Expression, or Completion Interval.
Executor Service RefSpecifies a reference for looking up the executorService to use for thread pool management when using the Parallel Processing option or when sending out aggregated exchanges.
Force Completion On StopSpecifies whether to complete all aggregated exchanges currently in route when the routing context is stopped. The default is Disabled.
Completion IntervalSpecifies an interval of time, in milliseconds, after which the aggregator completes any in process aggregate messages. This property cannot be used with Completion Timeout.
Ignore Invalid Correlation KeysSpecifies whether the aggregator ignores invalid correlation keys. The default is Disabled, which causes the aggregator to throw an exception when it encounters an invalid correlation key.
Aggregation Repository RefSpecifies a reference for looking up a custom AggregationRepository in the registry. The AggregationRepository stores the messages while they are being aggregated (held).
Discard On Completion TimeoutSpecifies whether aggregates that are completed due to a timeout, in milliseconds, are discarded. The default is Disabled.
Completion From Batch ConsumerSpecifies whether aggregates can be completed based on information from a batch consumer. The default is Disabled.
Completion SizeSpecifies the number of exchanges the aggregator processes before marking the aggregated message complete.
Eager Check Completion

Specifies whether the aggregator determines completion by eagerly checking the data as exchanges are received or by checking the data after it's been aggregated into a single exchange. The default is Disabled.

This property works in conjunction with and influences the behavior of the Completion Predicate property.

Group ExchangesSpecifies whether the aggregator groups all outgoing exchanges into a single GroupedExchange object. The default is Disabled.
Parallel ProcessingSpecifies whether the aggregator processes multiple messages concurrently. The default is Disabled.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

Name

Dynamic Router — Routes messages based on rules specified by the recipients at start up

Name

Idempotent Consumer — Filters out duplicate messages

Name

Load Balance — Balances message processing among a number of nodes

Name

Multicast — Routes a message to a number of endpoints

Properties

Table 3.11 describes the properties you can specify using the properties editor.

Table 3.11. Multicast Properties

NameDescription
TimeoutSpecifies the amount of time, in milliseconds, the node will attempt to deliver a message before timing out.
StreamingSpecifies whether multicast operates in streaming mode. The default is Disabled.
On Prepare Ref

Specifies a reference to a bean implementing a custom onPrepare processor that processes the original message before it is passed to multiple destinations in the route.

This property enables you to deep clone mutable message bodies, so each destination gets a separate copy of the entire exchange. You can use this property to execute any kind of logic on a message exchange.

Parallel ProcessingSpecifies whether the multicast messages are forwarded to multiple destinations concurrently. The default is Disabled.
Stop On ExceptionSpecifies whether the node will stop all processing if one of the endpoints receiving a message throws an exception. The default is Disabled.
Strategy RefSpecifies a reference for looking up the AggregationStrategy in the registry.
Executor Service RefSpecifies a reference for looking up the executorService to use for thread pool management.
Share Unit of WorkSpecifies whether all of the resulting exchanges are considered a single shared unit of work. The default is Disabled.
Inherit Error HandlerSpecifies whether the node should use the error handler configured for the route. The default is Disabled.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

Name

Recipient List — Routes messages to a number of dynamically specified recipients

Properties

Table 3.14 describes the properties you can specify using the properties editor.

Table 3.14. Recipient List Properties

NameDescription
ExpressionSpecifies the expression used to generate the list of recipients.
languageSpecifies the expression language used to process the expression.
Inherit Error HandlerSpecifies whether the node should use the error handler configured for the route. The default is Disabled.
Parallel ProcessingSpecifies whether the recipient list can send messages to multiple recipients concurrently. The default is Disabled.
TimeoutSpecifies the amount of time, in milliseconds, the node will attempt to deliver a message before timing out.
Executor Service RefSpecifies a reference for looking up the executorService to use for thread pool management.
Strategy RefSpecifies a reference for looking up the AggregationStrategy in the registry.
Share Unit of WorkSpecifies whether all of the resulting exchanges are considered a single shared unit of work. The default is Disabled.
Stop On ExceptionSpecifies whether the node will stop all processing if one of the endpoints receiving a message throws an exception. The default is Disabled.
DelimiterSpecifies a delimiter to separate the list of endpoint URIs in the generated recipient list.
Ignore Invalid EndpointsSpecifies whether router will skip steps that are invalid without throwing an exception. The default is Disabled.
On Prepare Ref

Specifies a reference to a bean implementing a custom onPrepare processor that processes the original message before it is passed to the list of specified destinations.

This property enables you to deep clone mutable message bodies, so each destination receives a separate copy of the entire exchange. You can use this property to execute any kind of logic on a message exchange.

StreamingSpecifies whether the recipient list works in streaming mode. The default is Disabled.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

Name

Resequence — Resequences messages based on an expression

Name

Split — Sorts the contents of the message

Properties

Table 3.20 describes the properties you can specify using the properties editor.

Table 3.20. Split Properties

NameDescription
ExpressionSpecifies the expression used to split the message.
languageSpecifies the expression language used to process the expression.
Inherit Error HandlerSpecifies whether the node should use the error handler configured for the route. The default is Disabled.
On Prepare Ref

Specifies a reference to a bean implementing a custom onPrepare processor that processes the original message before/ it is split up and passed to the next step in the route.

This property enables you to deep clone mutable message bodies, so the splitter creates separate, self-contained fragments of the message. You can use this property to execute any kind of logic on a message exchange.

TimeoutSpecifies the amount of time, in milliseconds, the node will attempt to deliver a message before timing out.
Share Unit of WorkSpecifies whether all of the resulting exchanges are considered a single shared unit of work. The default is Disabled.
Parallel ProcessingSpecifies whether the splitter can send messages to multiple destinations concurrently. The default is Disabled.
Stop On ExceptionSpecifies whether the node will stop all processing if one of the endpoints receiving a message throws an exception. The default is Disabled.
Executor Service RefSpecifies a reference for looking up the executorService to use for thread pool management.
Strategy RefSpecifies a reference for looking up the AggregationStrategy in the registry.
StreamingSpecifies whether the splitter works in streaming mode. The default is Disabled.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

Name

Wire Tap — Routes a copy of a message to a secondary destination while passing the original message to the actual recipient, or it creates a new message and passes that to the recipient.

Properties

Table 3.22 describes the properties you can specify using the properties editor.

Table 3.22. Wire Tap Properties

NameDescription
New Exchange ExpressionSpecifies the expression used to determine the contents of the new message exchange.
languageSpecifies the expression language used to process the expression.
UriSpecifies the URI of the endpoint to which the copy is routed. See Table of Components in Component Reference for a list of valid URI patterns.
New Exchange Processor RefSpecifies a reference to a bean implementing a message processor to process the original message before it is passed to the next step in the route.
On Prepare Ref

Specifies a reference to a bean implementing a custom onPrepare processor that processes the original message before it is passed to the next step in the route.

This property enables you to deep clone mutable message bodies, preserving an entire exchange as a separate entity. You can use this property to execute any kind of logic on a message exchange.

CopySpecifies whether the original message is copied into the new message. The default is Enabled.
Executor Service RefSpecifies a reference for looking up the executorService to use for thread pool management.
Headers

Specifies one or more header settings for a new message. The Add button opens a dialog for adding a header to the table.

  • Header—Specifies the name of the header

  • Expression—Specifies the value, as an expression, assigned to the header

  • Language—Specifies the language to use to process the expression

The Edit button opens the selected header for editing. The Delete button removes the selected header from the table.

IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

Catch — Catches exceptions as part of a try, catch, finally block
Delay — Delays processing for a specified length of time
Finally — Node traversed when a try, catch, finally block exits
Intercept — Intercepts a message at each step in the route
Intercept From — Intercepts incoming messages
Intercept Send To Endpoint — Intercepts messages sent to an endpoint
Loop — Processes a message multiple times
On Completion — Route to be executed when normal route processing completes
On Exception — Route to be executed when an exception is thrown
Rollback — Forces a rollback of a route
Throttle — Controls the rate at which messages are passed to the next node in the route
Throw Exception — Throws an exception
Transacted — Marks a route as a transaction
Try — Marks the beginning of a Try, Catch, Finally block

Name

On Completion — Route to be executed when normal route processing completes

Name

On Exception — Route to be executed when an exception is thrown

Properties

Table 4.9 describes the properties you can specify using the properties editor.

Table 4.9. On Exception Properties

NameDescription
ContinuedSpecifies an expression that determines whether the exception is ignored and processing of the original route continues after the onException route completes.[a]
languageSpecifies the expression language used to process the continued expression.
Retry WhileSpecifies an expression that determines if the message causing the exception should be redelivered. The message is redelivered until the expression evaluates to false.[a]
languageSpecifies the expression language used to process the expression.
HandledSpecifies an expression that determines if the exception is marked as handled.[a]
languageSpecifies the expression language used to process the expression.
ExceptionsSpecifies the list of exceptions the node handles. The Add button adds an entry typed in the field. The Delete button removes the selected entry from the list.
Redelivery Policy RefSpecifies a reference to bean defining the redelivery policy.
On Redelivery RefSpecifies a reference to a custom processor for processing the message before it is redelivered.
Inherit Error HandlerSpecifies whether the node should use the error handler configured for the route. The default is Disabled.
Use Original Message PolicySpecifies whether the message that began the route is placed in the dead letter queue instead of the message that caused the exception. The default is Disabled.
Redelivery PolicySpecifies how to handle failed deliveries. Redelivery options are listed in Table 4.10.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

[a] The expression is treated as returning a boolean. If the expression evaluates to a non-boolean value other than null it is evaluated as returning true.


Redelivery Policy

Table 4.10 describes the properties for configuring the redelivery policy.

Table 4.10. Redelivery Properties

NameDescription
Async Delayed RedeliverySpecifies whether asynchronous delayed redelivery is used to scheduled redelivers at a later time. When enabled, an asynchronous thread, rather than the current thread, performs redelivery. This ensures that no thread is blocked waiting for a redelivery. The default is false.
Back Off Multiplier

Specifies the multiplier used to determine the redelivery delay if exponential back-off is enabled. If m is the back-off multiplier and d is the redelivery delay, the sequence of redelivery attempts are then timed as follows:

d, m*d, m*m*d, m*m*m*d, ...

The default is 2.

Collision Avoidance FactorSpecifies a factor that is used to randomly tweak the redelivery delay if collision avoidance is enabled. The collision avoidance policy tweaks the next delay by a random amount, up to plus/minus p% of its current value. The default is 0.15.
Delay PatternSpecifies a pattern to use for calculating the delay, which enables you to specify fixed delays for interval groups. For example, the pattern 0:1000; 5:5000; 10:30000 specifies a 1 second delay between redelivery attempts 0 through 4, a 5 second delay between attempts 5 through 9, and a 30 second delay between all subsequent attempts.
Disable RedeliverySpecifies whether to disable the redelivery feature. Redelivery is enabled when Maximum Redeliveries is set to a positive number.
Log ContinuedSpecifies whether to log continuously reoccurring exceptions. The default is false.
Log ExhaustedSpecifies whether to log all failed redelivery attempts. The default is true.
Log HandledSpecifies whether to log handled exceptions. The default is false.
Log Retry AttemptedSpecifies whether to log redelivery attempts. The default is true.
Log Retry Stack TraceSpecifies whether to log stack traces for failed delivery attempts. The default is false.
Log Stack TraceSpecifies whether to include the JVM stack trace in the error logs. The default is true.
Maximum RedeliveriesSpecifies the maximum number of delivery attempts. The default is 0.
Maximum Redelivery DelaySpecifies, in milliseconds, the maximum redelivery delay when using an exponential back-off strategy. The default is 60 * 1000.
Redelivery DelaySpecifies the delay, in milliseconds, between redelivery attempts. The default is 1000.
Retries Exhausted Log LevelSpecifies the logging level at which to log delivery failure. The default is Error.
Retry Attempted Log LevelSpecifies the logging level at which to redelivery attempts. The default is Debug.
Use Collision AvoidanceSpecifies whether to use collision avoidance, which adds some randomization to the back-off timings, reducing the probability of contention. The default is false
Use Exponential Back OffSpecifies whether to use exponential backoff. The default is false.

Name

Throttle — Controls the rate at which messages are passed to the next node in the route

Convert Body — Converts the message body to a form usable by the next endpoint
Enrich — Enriches a message with data from a secondary resource
In Only — Marks the exchange pattern for the route to one way (Event Message pattern)
In Out — Marks the exchange pattern for the route to request/reply
Marshal — Marshals data into a specified format for transmission over a transport or component
Poll Enrich — Enriches messages with data retrieved from a polling consumer
Remove Header — Removes a named header from the message
Remove Headers — Removes message headers whose name matches a specified pattern
Remove Property — Removes a named property from the message exchange
Set Body — Sets the contents of the message body
Set Exchange Pattern — Sets the exchange pattern for the route
Set Fault Body — Sets the contents of a fault message's body
Set Header — Sets the value of a message header
Set Out Header — Sets the value of a header on the outbound message
Set Property — Sets a named property on the message exchange
Transform — Transforms the message based on an expression
Unmarshal — Converts the message data received from the wire into a format that Apache Camel processors can consume

Name

Marshal — Marshals data into a specified format for transmission over a transport or component

Properties

Table 5.5 describes the properties you can specify using the properties editor.

Table 5.5. Marshal Properties

NameDescription
Data Format Type

Specifies the data type into which the data will be marshalled. For data formats that require configuration, the format's tab provides the property fields to configure the marshaller.

Because the GZip, Serialization, String, and Zip data formats are part of the Camel core, you need not add dependencies for them in your Maven pom.xml file to use them. However, to use any of the other supported data formats, you must add a dependency on the component that implements the data format (for example, camel-protobuf, camel-xmlbeans, camel-flatpack, and so on) in your Maven pom.xml file.

  • bindy— Marshals Java Objects into flat data structures

  • castor—Marshals Java Objects to XML

  • crypto—Marshals Java Objects to encrypted cyphertext

  • csv—Marshals Java Objects to csv format

  • custom—Marshals Java Objects to a custom data format implemented using the DataFormat interface

  • flatpack—Marshals Java Objects to fixed-width or delimited text messages

  • gzip—Marshals normal, uncompressed messages to gzipped compressed messages

  • hl7—Marshals HL7 HAPI message objects to byte streams

  • jaxb—Marshals Java Objects to XML

  • jibx—Marshals Java Objects to XML using the JiBX library

  • json—Marshals Java Objects to JSON

  • pgp—Marshals Java Objects to encrypted cyphertext

  • protobuf—Marshals Java Objects to Protocol Buffers format (Google's data exchange format)

  • rss—Marshals ROME SyndFeed messages to XML String messages

  • secureXML—Marshals plain XML to encrypted XML. This data format works at the document, element, and element content levels.

  • serialization—Marshals Java Objects to a binary blob using the standard Java serialization mechanism

  • soapjaxb—Marshals a tree of Java Objects to a SOAP message using JAXB and JAX-WS annotations

  • string—Marshals XML or text-based messages to String Objects

  • syslog—Marshals Java String Objects to RFC3164 message format

  • xmlbeans—Marshals Java objects to XML using the XmlBeans library

  • xstream—Marshals Java objects to XML using the XStream library

  • zip—Marshals normal, uncompressed messages to zipped compressed messages

RefSpecifies a reference to a Spring bean configuring the Apache Camel data format to which the message body is marshalled.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

crypto

Table 5.8 describes the properties needed to configure the crypto marshaller.

Table 5.8. crypto Properties

NameDescription
AlgorithmSpecifies the name of the JCE cryptographic algorithm to use. Default is DES/CBC/PKCS5Padding.
Algorithm Parameter RefSpecifies a reference to the JCE AlgorithmParameterSpec to use to initialize the cipher. Some crypto algorithms, particularly block algorithms, require initialization by an initial block of data, known as an Initialization Vector. The JCE passes the Initialization Vector to the cipher as an AlgorithmParameterSpec . Select from the list of available options.
BuffersizeSpecifies the size, in bytes, of the buffer used in the signature process.
Crypto ProviderSpecifies the name of the JCE Security Provider to use. For options, see Java Cryptography Architecture; Sun Providers Documentation.
Init Vector RefSpecifies a reference to a byte array containing the Initialization Vector to use to initialize the cipher. Select from the list of available options.
InlineEnables inlining the configured Initialization Vector into the encrypted data stream.
Key RefSpecifies the value of the keyref attribute within the <dataFormats> element in a Spring configuration. For example, <crypto id="basic" algorithm="DES" keyref="desKey" />. Select from the list of available options.
Mac AlgorithmSpecifies the algorithm to use to create the Hash-based Message Authentication. Default is HmacSHA1. For more options, see Java Standard Names Reference.
Should Append HMACEnables calculating and appending a Message Authentication Code to the encrypted data.

Name

Set Exchange Pattern — Sets the exchange pattern for the route

Name

Unmarshal — Converts the message data received from the wire into a format that Apache Camel processors can consume

Properties

Table 5.31 describes the properties you can specify using the properties editor.

Table 5.31. Unmarshal Properties

NameDescription
Data Format Type

Specifies the data type to which the data will be unmarshalled. For data formats that require configuration, the format's tab provides the property fields to configure the marshaller.

Because the GZip, Serialization, String, and Zip data formats are part of the Camel core, you need not add dependencies for them in your Mavenpom.xml file to use them. However, to use any of the other supported data formats, you must add a dependency on the component that implements the data format (for example, camel-protobuf, camel-xmlbeans, camel-flatpack, and so on) in your Mavenpom.xml file.

  • bindy— Unmarshals flat data structures to Java Objects

  • castor—Unmarshals XML to Java Objects

  • crypto—Unmarshals encrypted cyphertext to Java Objects

  • csv—Unmarshals csv data to Java Objects

  • custom—Unmarshals a custom data format implemented using the DataFormat interface to Java Objects

  • flatpack—Unmarshals fixed-width or delimited text messages to Java Objects

  • gzip—Unmarshals gzipped compressed messages to uncompressed messages

  • hl7—Unmarshals byte streams to HL7 HAPI message objects

  • jaxb—Unmarshals XML to Java Objects

  • jibx—Unmarshals XML to Java Objects using the JiBX library

  • json—Unmarshals JSON to Java Objects

  • pgp—Unmarshals encrypted cyphertext to Java Objects

  • protobuf—Unmarshals Protocol Buffers format (Google's data exchange format) to Java Objects

  • rss—Unmarshals ROME SyndFeed messages to XML String messages

  • secureXML—Unmarshals encrypted XML to plain XML. This data format works at the document, element, and element content levels (including simultaneous, multinode encryption using XPath).

  • serialization—Unmarshals a binary blob to Java Objects using the standard Java serialization mechanism

  • soapjaxb—Unmarshals a SOAP message to a tree of Java Objects using JAXB and JAX-WS annotations

  • string—Unmarshals XML or text-based messages to String Objects

  • syslog—Unmarshals Java String Objects to RFC3164 message format

  • tidyMarkup—Unmarshals untidy HTML to well-formed HTML

  • xmlbeans—Unmarshals Java objects to XML using the XmlBeans library

  • xstream—Unmarshals Java objects to XML using the XStream library

  • zip—Unmarshals zip compressed messages to uncompressed messages

RefSpecifies a reference to a Spring bean configuring the Apache Camel data format to which the message body is unmarshalled.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

crypto

Table 5.34 describes the properties needed to configure the crypto unmarshaller.


jaxb

Table 5.37 describes the properties needed to configure the jaxb unmarshaller.

Table 5.37. jaxb Properties

NameDescription
Context PathSpecifies the context path for the jaxb data format. For example, org.apache.camel.example
Encoding

Specifies the encoding to use when unmarshalling data. Valid values include:

  • ISO-8859-1

  • US-ASCII

  • UTF-8

With no value specified, Fuse IDE defaults to the encoding used by JAXB.

Filter Non XML CharsEnables the filtering of non XML characters during marshalling such that the marshaller replaces any non XML characters it encounters with the string " ". Otherwise, when it encounters a non XML character, the marshaller throws an exception.
FragmentEnables the marshaller's FRAGMENT encoding property, which prevents the marshaller from generating the XML declaration. Enable this property in conjunction with setting Part Class and Part Namespace to perform partial marshalling on only a fragment of the XML tree.
Ignore JAXBElementDisables the ignoreJAXBElement property so that the unmarshaller returns the JAXBElement object from the body of the unmarshalled message, instead of the value of the element instance (default behavior).
Part ClassSpecifies the uri of the class within the XML tree that you want to marshal, leaving all other classes in the tree as is. Set this property in conjunction with Fragment and Part Namespace to perform partial marshalling on only a fragment of the XML tree.
Part NamespaceSpecifies the Qname of the destination namespace.
Pretty PrintEnables pretty printing, which adds white space as needed to tidy up the resulting XML for easy reading.

zip

Table 5.46 describes the properties needed to configure the zip unmarshaller.


AOP — Does processing before and/or after the route is completed
Policy — Defines a policy the route will use
Sampling — Extract a sample of the exchanges passing through a route
Stop — Stops the processing of the current message
Threads — Specifies that all steps after this node are processed asynchronously
Validate — Validates a message based on an expression

Name

Threads — Specifies that all steps after this node are processed asynchronously

Properties

Table 6.5 describes the properties you can specify using the properties editor.

Table 6.5. Threads Properties

NameDescription
Time UnitSpecifies the unit of measure for timeout values.
Pool SizeSpecifies the core pool size for the thread pool.
Max Pool SizeSpecifies the maximum pool size for the thread pool.
Thread NameSpecifies an expression, in the simple language, that is used to generate unique names for the threads used to process messages.
Max Queue SizeSpecifies the maximum size of the thread queue.
Executor Service RefSpecifies a reference for looking up the executorService to use for thread pool management.
Keep Alive TimeSpecifies the amount of time a thread can be idle before it is reaped.
Inherit Error HandlerSpecifies whether the node should use the error handler configured for the route. The default is Disabled.
Caller Runs When RejectedSpecifies whether tasks rejected by the thread pool are executed by the calling thread. The default is Disabled.
Rejected Policy

Specifies how tasks rejected by the thread pool are handled. Valid values are:

  • Abort—the handler throws a runtime RejectedExecutionException upon rejection.

  • CallerRuns—the thread that invokes execute itself runs the task.

  • DiscardOldest—the task at the head of the work queue is dropped, and then execution is retried.

  • Discard—the task that cannot be executed is dropped.

IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

The Route icon (Figure 7.1) appears in Outline view. It represents an individual route in a routing context file. In projects consisting of multiple routes, the route icons appear in Outline view in the order they appear within the camelContext element of the routing context file.


Table 7.1 describes the properties you can specify for a route using the Properties editor.

Table 7.1. Route Properties

NameDescription
Auto Startup

Specifies whether to start the route automatically when Camel starts up. The default is true.

Shutdown Route

Specifies when to stop the route. Options are:

  • Default—stop immediately

  • Defer—wait until Camel shuts down

Startup OrderSpecifies the order in which to start this route in relation to other routes in the routing context when Camel starts up. Valid values are integers corresponding to the number of routes in the routing context.
TraceSpecifies whether to trace the path of an exchange through a particular route. The default is false.
Stream CacheSpecifies whether to cache streams that otherwise could not be accessed multiple times. This is necessary for implementing redelivery during error handling, which requires reading the stream multiple times. The default is false.
Error Handler RefSpecifies a reference to a bean that defines and applies an error handler.
Route Policy RefSpecifies a reference to a bean that defines and applies a policy that controls routes at runtime. The bean can implement any logic that you want Apache Camel to invoke at route start or at route end.
DelayerSpecifies a delay, in milliseconds, that slows down message processing. This is useful during debugging, making it easier to inspect the logs while tracking messages. The default is 0.
Handle FaultSpecifies whether to convert fault messages into exceptions. Intended for applications deployed into a JBI container, so the Camel error handler can react to faults. The default is false.
Shutdown Running Task

Specifies how the routing context shuts down. Options are:

  • CompleteCurrentTaskOnly—[Default] shutdown immediately after the current task has finished

  • CompleteAllTasks—shutdown after all pending tasks have finished

GroupSpecifies the name of a group of which the route is a member. This property is informational only. It is not used by Apache Camel.
IdSpecifies a unique id for the route. This id appears in the generated XML (Source view) and with the Route icon in Outline view. It also appears in log entries. If left blank, Fuse IDE assigns the route a default Id.
DescriptionSpecifies a textual description for the route. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.