LibraryLink ToToggle FramesPrintFeedback

Miscellaneous Changes

Apache Camel 2.2 uses the new DefaultErrorHandler, instead of the DeadLetterChannel (versions 1.x), as the default error handler. This new DefaultErrorHandler implementation does not catch and handle thrown exceptions, which means any exception thrown will be propagated back to the caller.

Stream caching is a feature that enables you to re-read a message body consisting of a stream type. The interaction between Apache ServiceMix and Apache Camel has now been modified in such a way that Apache Camel does not need to use stream caching. It is therefore disabled by default.


If necessary, you can re-enable caching by adding the streamCaching() command to a route in the Java DSL or by setting the route element's streamCaching attribute to true in the Spring XML DSL.

The following changes have been made to the Java annotations:

Since Apache Camel 2.0, header look-up in org.apache.camel.Message is case-insensitive. This means that if you look up a header using differently cased keys (such as Foo and foo), you will obtain a reference to the same header entry. This makes header look-up less error-prone when used with protocols such as HTTP, where header names are inherently case insensitive.

The round robin load balancing behavior has changed in Apache Camel 2.2. In version 1.x, the round robin load balancer would fail over, if an endpoint failed to process the message. In version 2.2, the round robin load balancer does not fail over immediately, but tries to redeliver the message to the same endpoint, according to the error handling configuration.


Apache Camel 2.3 will introduce an option that allows you to specify which behavior you want the endpoint to exhibit.

Since Apache Camel 2.3, if the exchange that enters the splitter has the InOut message-exchange pattern (that is, a reply is expected), the splitter returns a copy of the original input message as the reply message in the Out message slot. To revert to the old (pre 2.3) behavior, configure the splitter to use the UseLatestAggregationStrategy aggregation strategy.

Since Apache Camel 2.3, the type conversion from NodeList to String is implemented differently. Previously, just the text was converted, but the now the converted string includes the XML tags, child tags, attributes, and so on. One consequence of this is that existing XPath expressions must be changed, if you want to access just the text content of an element.

For example, previously xpath("/payment/amount") would return the text content of the amount element. But now you have to write xpath("/payment/amount/text()") to get the text content of the amount element.

The character set used by Apache Camel converters can be set using the org.apache.camel.default.charset Java system property. The default is UTF-8.