Modified: websites/production/camel/content/camel-2160-release.html
==============================================================================
--- websites/production/camel/content/camel-2160-release.html (original)
+++ websites/production/camel/content/camel-2160-release.html Mon Jul 13
11:20:09 2015
@@ -84,7 +84,7 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><h1
id="Camel2.16.0Release-Camel2.16.0release(currentlyinprogress)">Camel
2.16.0 release (currently in progress)</h1><div
style="padding-right:20px;float:left;margin-left:-20px;"><p><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-external-resource"
src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"
data-image-src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"></span></p></div><div
style="min-height:200px"> </div><h2
id="Camel2.16.0Release-NewandNoteworthy">New and Noteworthy</h2><p>Welcome to
the 2.16.0 release which approx XXX issues resolved (new features, improvements
and bug fixes such as...)</p><p>Noteworthy improvements:</p><ul><li>The route
models (definition classes) preserve property placeholders, which allows round
trip editing, and also prevents showing potential sensitive
information</li><li>Added onPrepareFailure option to <a shape
="rect" href="dead-letter-channel.html">Dead Letter Channel</a> to allow a
custom processor to prepare the Exchange before sending to the dead letter
queue.</li><li><a shape="rect" href="mongodb.html">MongoDB</a> tailable
consumers now allow setting the <code>readPreference</code>
option.</li><li>Using setFaultBody / setFaultHeader behaves similar to setBody
/ setHeader to preserve existing headers/attachments by setting on existing IN
or OUT message.</li><li>Java DSL using choice with end vs endChoice now
validates you use them as intended. Any misconfiguration now throws an
exception explaining the problem.</li><li><a shape="rect"
href="pojo-producing.html">POJO Producing</a> and <a shape="rect"
href="pojo-consuming.html">POJO Consuming</a> lifecycle is now in sync with <a
shape="rect" href="camelcontext.html">CamelContext</a> which ensures it
works as similar to Camel <a shape="rect" href="routes.html">Routes</a>
does. Also the created producer/consumer is stopped
when <a shape="rect" href="camelcontext.html">CamelContext</a> is
stopping to cleanup properly.</li><li><a shape="rect"
href="jms.html">JMS</a> component now allows configuring
concurrentConsumers/maxConcurrentConsumers separately between from(jms) vs
to(jms) using request/reply over JMS</li><li><span><a shape="rect"
class="external-link"
href="https://issues.apache.org/jira/browse/CAMEL-8506">Added SEARCH</a>
operation to Elasticsearch component</span></li><li><span>The <a
shape="rect" href="properties.html">Properties</a> component (property
placeholder) now supports an encoding option to allow reading the .properties
files using a specific charset such as UTF-8. By default ISO-8859-1 is used
(latin1)</span></li><li><span>Added <code>receviveBufferSize</code> option
to the <a shape="rect" href="ftp.html">FTP</a> component to make download
faster. The size is by default 32kb buffer.</span></li><li><span>The <a
shape="rect" href="aggregator2.html">
Aggregator2</a> EIP now allows an external source using
a <code>AggregateController</code> to control the aggregator, such as for
forcing completing a group or all groups, or query runtime information from the
aggregator. A default controller is provided out of the box if none has been
configured.</span></li><li><span>The <a shape="rect"
href="aggregator2.html">Aggregator2</a> now enlists in JMX using
a <code>ManagedAggregateProcessorMBean</code> which has more information,
and also allows using the aggregate controller to control
it.</span></li><li><span>The <a shape="rect"
href="aggregator2.html">Aggregator2</a> now includes more runtime statistics
which can be accessed from Java and JMX about number of incoming and completed
exchanges, and per different completion
triggers.</span></li><li><span>The <a shape="rect"
href="aggregator2.html">Aggregator2</a> now supports pre-completion mode if the
aggregation strategy implements <code>PreCompletionAwareAg
gregationStrategy</code>. This supports the use-case where an incoming
Exchange are used to determine if the current aggregated group is completed or
not. If completed the group is emitted as-is, and the new incoming Exchange is
used to start a new group from scratch.</span></li><li><span>Added options
to <a shape="rect" href="mail.html">Mail</a> consumer so it can skip or
handle a mail message that cannot be read from the mail server in the batch;
and then move on to read the next message. This ensures the consumer can deal
with mail boxes that has problematic mails that otherwise will cause no mails
to be retrieve by the consumer in the batch.</span></li><li>The runtime route
processors and their corresponding model definition are now linked by their id
using <code>HasId</code>, so its easier to obtain the processor or model
definition from the <code>getProcessor(id)</code> and
<code>getProcessorDefintion(id)</code> api on
CamelContext.</li><li>CamelContext now also
includes a getManagedProcessor API to easily get the mbean client api for the
processor, so you can access the runtime JMX statistics from Java
code. </li><li><span><a shape="rect" href="spring-boot.html">Spring
Boot</a> applications now <a shape="rect" class="external-link"
href="https://issues.apache.org/jira/browse/CAMEL-8532">block the main thread
of the execution</a></span></li><li><span><a shape="rect"
href="spring-boot.html">Spring Boot</a> automagically <a shape="rect"
class="external-link"
href="https://issues.apache.org/jira/browse/CAMEL-8523">loads XML routes
definitions</a> from
classpath</span></li><li><span>Added <code>MainListener</code> to make it
easier for Camel Boot / Standalone Camel to implement custom logic to trigger
during the starting and stopping of the
application.</span></li><li><span><span>Camel Jackson now provides <a
shape="rect" class="external-link"
href="https://issues.apache.org/jira/browse/CAMEL-8554"><code>Map</code> to
<code>Object</c
ode> converter</a></span></span></li><li><span>Ability to refer to existing
hazelcast instance by id, using <a shape="rect"
href="hazelcast-component.html">Hazelcast Component</a></span></li><li><a
shape="rect" href="direct.html">Direct</a> and <a shape="rect"
href="direct-vm.html">Direct-VM</a> now supports
the <span>failIfNoConsumers option</span></li><li>Making it easier to add
custom <a shape="rect" href="type-converter.html">Type Converter</a> to
your Camel applications without having to use the META-INF file. In Spring or
Blueprint just add them as <bean>s. See more details at <a
shape="rect" href="type-converter.html">Type Converter</a>
documentation.</li><li>camel-cxf PAYLOAD supports stream cache out of
box.</li><li><p><code>BridgePropertyPlaceholderConfigurer</code> supports to
handle the <span><a shape="rect" href="jasypt.html">jasypt </a>encryption
inside and outside of the camelContext.</span></p></li><li><p>The camel-aws
component now sup
port Amazon DynamoDB version 2<span><br
clear="none"></span></p></li><li><p>The <a shape="rect"
href="wire-tap.html">Wire Tap</a> eip now also emits event notifications when
sending the Exchange to the wire tap destination</p></li><li><a shape="rect"
href="camel-test.html">Camel Test</a> has new option isDumpRouteStats that
dumps all route usage statistics as XML files in target/camel-route-stats
directory, which can be used to inspect "route coverage" reports.</li><li>Now
<a shape="rect" href="netty4.html">Camel Netty</a> component doesn't intercept
consumers with <code>httpMethodRestrict=OPTIONS</code></li><li><span>Now <a
shape="rect" href="netty4-http.html">Netty HTTP</a> resolves OPTIONS prefix
matches earlier</span></li><li>Using <a shape="rect"
href="load-balancer.html">Load Balancer</a> with Java DSL now builds the route
model using the specific model types, which renders a more accurate route
model</li><li>Enhanced the PredicateBuilder to support vargs and list in
the "or" builder method</li><li>Using custom <code>HttpBinding</code>
with <a shape="rect" href="http.html">HTTP</a> and <a shape="rect"
href="http4.html">HTTP4</a> is now easier as they can be instantiated using a
default no-arg constructor</li><li>Added <code>readLock=idempotent</code>
to the <a shape="rect" href="file2.html">File2</a> consumer which allows
to reuse an idempotent repository as read-lock which enables Camel to run
reliable in clustered mode, where each node competes for the same files from a
shared file system. This requires that the idempotent repository supports
clustering such as <a shape="rect"
href="hazelcast-component.html">Hazelcast Component</a> or <a shape="rect"
href="infinispan.html">Infinispan</a> - or using the JDBC for a shared database
table.</li><li><a shape="rect" href="rx.html">Camel RX</a> now ensures that
observe and subscribe are done within an unit of work to ensure on completions
is executed, such as they a
re done when you use regular Camel routes.</li><li>The <a shape="rect"
href="jms.html">JMS</a> component now includes the
underlying <code>javax.jms.Session</code> instance on the Camel message
which allows end users to easier to use client acknowledge mode, in case the
client wants to use the session to call recover or rollback.</li><li>Added
<code>completionEager</code> option to <a shape="rect"
href="idempotent-consumer.html">Idempotent Consumer</a> to whether to complete
the idempotent consumer eager or when the exchange is done.</li><li>Working
with the Camel source code in Eclipse with m2eclipse plugin improved to avoid
endless file changed detection and recompile the source.</li><li>Add
option <code>suppressExceptions</code> to <a shape="rect"
href="jsonpath.html">JSonPath</a> which allows to ignore exceptions such as
NoSuchPathException when the json payload does not contain the path defined in
the json expression.</li><li><a shape="rect" h
ref="spring-boot.html">Spring Boot</a> now creates <code>CamelContext</code>,
<code>ProducerTemplate</code> and <code>ConsumerTemplate</code> beans only if
those are not defined by the
user.  </li><li>New <code>camel-archetype-spring-boot</code> to
create a new Camel Spring Boot project using
Maven.</li><li>New <code>camel-archetype-cdi</code> to create a new
Camel CDI project using Maven.</li><li><a shape="rect"
href="ftp2.html">FTP2</a> doesn't support absolute directories in endpoint
URIs. In such cases, paths will be treated as relative and WARN message will be
printed in logs. In future versions, there'll be no such assumption and
validation exception will be thrown instead.</li><li><a shape="rect"
href="swagger.html">Swagger</a> module now supports getting api-docs from
multiple camel contexts in the JVM. The entry point at /api-docs now lists the
contexts detected, and you need to append the context id in the path, eg
/api-docs/myCamel</li><li><a shap
e="rect" href="ftp2.html">FTP2</a> supports <code>autoCreate=true</code>
for ftp consumers</li><li><a shape="rect" href="rest-dsl.html">Rest DSL</a> now
supports to define parameter using fine grained details for the <a shape="rect"
href="swagger.html">Swagger</a> api documentation. For an example see
the <code>camel-example-servlet-rest-tomcat</code> in the Apache Camel
distribution.</li><li>The <a shape="rect" href="simple.html">Simple</a>
language now has a equals ignore case operator (=~) when comparing with string
values </li><li>If using <contextScan> with Spring or Blueprint to
filter RouteBuilder classes, then Camel will now by default only look for
singleton beans. You can turn on the old behavior to include prototype scoped
with the new option <pre>includeNonSingletons</pre></li><li>The <a
shape="rect" class="external-link"
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/IdempotentRepository.html">Idem
potentRepository</a> now supports clear operation, to clear the repository,
and expose it over JMX.</li><li><a shape="rect"
href="netty4.html">Netty4</a> in clientMode will now automatic re-connect
if the connection was disconnected to the
server.</li><li>The <code>throwException</code> EIP now supports
creating a new exception instance from a simple language expressions, which
allows to make it dynamic based on information from the current
Exchange.</li><li>When using <a shape="rect"
href="expression.html">Expression</a> or <a shape="rect"
href="predicate.html">Predicate</a> in the routes, you can refer to the value
as an external resource by using <strong>resource:classpath:path</strong> or
<strong>resource:file:path</strong> - for example
<code>resource:classpath:com/foo/myscript.groovy</code>.</li><li>Added option
useMessageBodyForSql to the <a shape="rect" href="sql-component.html">SQL
Component</a> which allows to use more dynamic SQL queries inst
ead of the fixed SQL defined in the endpoint uri.</li><li>Added sticky option
to failover <a shape="rect" href="load-balancer.html">Load
Balancer</a> so the load balancer can start from the last known good
endpoint.</li><li>Added option <code>shareUnitOfWork</code> to <a
shape="rect" href="content-enricher.html">Content Enricher</a>
eip</li></ul><p>Fixed the following issues:</p><ul><li>File language now
properly supports file extensions having double dots, such as
.tar.gz</li><li>Fixed issue with doTry not stopping routing if a fault message
was set using setFaultBody within the doTry.</li><li>Fixed <a shape="rect"
href="bean.html">Bean</a> language to support end parenthesis in quoted
string literals as part of method parameters, and not as end of method
signature. </li><li>Fixed <a shape="rect" href="ftp2.html">FTP2</a>
using <code>pollEnrich</code> with disconnect=true and delete=true, would
disconnect before deleting the file. Now we
disconnect last.</li><li>Various EIPs such as <a shape="rect"
href="splitter.html">Splitter</a>, <a shape="rect"
href="recipient-list.html">Recipient List</a>, <a shape="rect"
href="multicast.html">Multicast</a> no longer reuse message id in their sub
messages, but each sub message has its own unique message id (just as the
exchange has).</li><li>Fixed an issue with the circuit breaker <a
shape="rect" href="load-balancer.html">Load Balancer</a> not honoring the half
open after period after an error was detected.</li><li>Fixed <a
shape="rect" href="ftp2.html">FTP2</a> now calling disconnect if there was no
messages to poll, even when disconnect=true configured.</li><li>Fixed <a
shape="rect" href="throttler.html">Throttler</a> using method call expression
in XML DSL was not working</li><li>Fixed stopping a route may stop context
scoped OnException that would otherwise send message to an endpoint, now
been stopped and an IllegalStateException was thr
own while handling the exception.</li><li>Fixed using a <a shape="rect"
href="load-balancer.html">Load Balancer</a> from a context
scoped onException may double up its processors participating in the
balancer per route in the
context.</li><li>Fixed <code>parallelAggregate</code> on
multicast/splitter/recipient list to use a thread pool for running
concurrently. </li><li>Fixed <a shape="rect"
href="stream-caching.html">Stream caching</a> to not delete data that was
spooled to disk before both exchanges are done routing.</li><li>Fixed <a
shape="rect" href="defaulterrorhandler.html">DefaultErrorHandler</a> to use 1
sec redelivery delay out of the box as the other error handlers
does. </li><li>Fixed
setting <code>logExhaustedMessageHistory=true</code> on <a
shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a> to log the
message history. This option is by default false on DLC as it would be as
before (not noisy).</li><li>Fixed
double refresh of the parent Spring Boot Application Context</li><li>Fixed
configuring endpoint uri's with primitive types when the value is looked up in
the registry using #notation would not work.</li><li>Fixed using transacted in
the Scala DSL</li><li>camel-swagger now filters out older Camel releases that
do not support rest-dsl when it discovers Camel's in the
JVM</li><li>Fixed <a shape="rect" href="mail.html">Mail</a> consumer
to use the default value of 60 seconds as poll interval again, instead of 0.5
sec.</li><li>Fixed <a shape="rect" href="netty.html">Netty</a> and <a
shape="rect" href="netty4.html">Netty4</a> may perform x2 redelivery when
attempting to redeliver to a netty producer endpoint</li><li>Fixed <a
shape="rect" href="recipient-list.html">Recipient List</a> would not work if
using RAW() syntax in endpoint uri</li></ul><h3 id="Camel2.16.0Release-New">New
<a shape="rect" href="enterprise-integration-patterns.html">Enterprise
Integration Pat
terns</a></h3><h3 id="Camel2.16.0Release-New.1">New <a shape="rect"
href="components.html">Components</a></h3><ul><li><a shape="rect"
href="paho.html">camel-paho</a> - For MQTT messaging using Eclipse Paho
client</li><li><a shape="rect" href="pdf.html">camel-pdf</a> - For creating PDF
documents</li><li><a shape="rect" href="grape.html">camel-grape</a>
- allows you to fetch, load and manage additional jars when CamelContext
is running.</li><li><a shape="rect" href="slack.html">camel-slack</a>
- allows you to connect to an instance of Slack and delivers a
message contained in the message body via a pre established Slack incoming
webhook.</li><li><a shape="rect" href="aws-ec2.html">camel-aws-ec2</a> -
Component providing support to Amazon Web Services EC2 </li></ul><h3
id="Camel2.16.0Release-NewDSL">New DSL</h3><ul><li><a shape="rect"
href="script.html">Script</a> - to execute a script during routing</li></ul><h3
id="Camel2.16.0Release-NewAnnotations">New Annot
ations</h3><h3 id="Camel2.16.0Release-NewDataFormats">New <a shape="rect"
href="data-format.html">Data Formats</a></h3><ul><li><a shape="rect"
href="boon.html">camel-boon</a> - For mapping POJO to/from json</li></ul><h3
id="Camel2.16.0Release-New.2">New <a shape="rect"
href="languages.html">Languages</a></h3><h3 id="Camel2.16.0Release-New.3">New
<a shape="rect" href="examples.html">Examples</a></h3><h3
id="Camel2.16.0Release-New.4">New <a shape="rect"
href="tutorials.html">Tutorials</a></h3><h2
id="Camel2.16.0Release-APIbreaking">API breaking</h2><ul><li><p
class="p1"> org.apache.camel.mode.LoadBalancerDefinition no longer
implements org.apache.camel.processor.loadbalancer.LoadBalancer which is
the runtime processor (this was never
intended).</p></li><li>The <code>ref</code> attribute
on <code><loadBalance></code> has been removed, as it has been
deprecated for a long time, and you should use
a <code><customLoadBalancer></code> to refer to a cust
om load balancer.</li><li>The <code>copy</code> method
on <code>StreamCache</code> now takes an <code>Exchange</code> as
parameter.</li><li>Various APIs in <code>camel-jms</code> has been
adjusted to support including the JMS session parameter -
<code>javax.jms.Session</code>. Though these API changes are mostly internal
facing, and we do not expect end users problems.</li></ul><h2
id="Camel2.16.0Release-KnownIssues">Known Issues</h2><h2
id="Camel2.16.0Release-Dependencyupgrades">Dependency
upgrades</h2><ul><li>Amazon Web Service Java SDK from 1.8.9.1 to
1.9.40</li><li>Apache Commons Cli from 1.2 to 1.3.1</li><li>Apache Commons
Compress from 1.5 to 1.9</li><li>Apache Commons Lang from 3.3.2 to
3.4</li><li>Apache Deltaspike from 1.3.0 to 1.4.1</li><li>Apache DS from
2.0.0-M19 to 2.0.0-M20</li><li>Apache HttpComponents Core from 4.3.3 to
4.4.1</li><li>Apache HttpComponents Client from 4.3.6 to 4.4.1</li><li>Apache
JClouds from 1.8.1 to 1.9.0</li><li>Apache Olingo O
data from 2.0.0 to 2.0.4</li><li>Apns from 0.2.3 to
1.0.0.Beta6</li><li>AspectJ from 1.6.2 to 1.8.5</li><li>Async-http-client from
1.9.8 to 1.9.26</li><li>Atmosphere from 2.2.6 to 2.3.2</li><li>Cassandra from
2.1.2 to 2.1.6</li><li><p>Cassandra Datastax Java Driver from 2.1.2 to
2.1.6</p></li><li>Chunk Templates from 2.6.3 to 2.6.4</li><li>DNSJava from
2.1.6 to 2.1.7</li><li>Docker-java from 0.10.5 to 1.3.0</li><li>Dropbox core
Java SDK from 1.7.6 to 1.7.7</li><li>Dropwizard Metrics from 3.1.0 to
3.1.2</li><li>Ehcache from 2.9.1 to 2.10.0</li><li>Facebook4j from 1.1.12 to
2.2.2</li><li>Freemarker from 2.3.21 to 2.3.22</li><li>Google App Engine from
1.8.3 to 1.9.21</li><li>Gson from 3.2 to 3.2.1</li><li>iCal4j from 1.5.0.2 to
1.6.0</li><li>Hazelcast from 3.4.2 to 3.5</li><li>Infinispan from 6.0.2.Final
to 7.2.3.Final</li><li><span>Jackson2 from 2.4.3 to
2.5.4</span></li><li><span>Jackrabbit from 2.10.0 to
2.10.1</span></li><li><span>Jboss Marshalling from 1.4.4.Final to 1.4.10.Final<
/span></li><li><span>Jboss Weld from 2.2.4.Final to
2.2.13.Final</span></li><li><span>Jgroups from 3.6.1.Final to
3.6.3.Final</span></li><li><span>Joda-time from 2.5 to
2.8.1</span></li><li><span>Jsch from 0.1.51 to 0.1.53</span></li><li>Jsonpath
from 1.2.0 to 2.0.0</li><li>Kafka from 0.8.1.1 to 0.8.2.0</li><li>LightCouch
from 0.1.3 to 0.1.8</li><li>MongoDB Java Driver from 2.12.4 to
3.0.2</li><li>MongoDB test harness from 1.46.4 to 1.48.0</li><li>Mvel2 from
2.2.1.Final to 2.2.5.Final</li><li>OGNL from 3.0.8 to 3.0.11</li><li>OpenEJB
from 4.6.0.2 to 4.7.2</li><li>OpenJPA from 2.3.0 to 2.4.0</li><li>Openshift
Java Client 2.5.0.Final to 2.7.0.Final</li><li>PDFBox from 1.6.0 to
1.8.9</li><li>Restlet from 2.2.x to 2.3.1<span><br
clear="none"></span></li><li>SLF4J from 1.7.10 to 1.7.12</li><li>Snakeyaml from
1.14 to 1.15</li><li>Spring upgrades</li><li>Sshd from 0.13.0 to
0.14.0</li><li>TestNG from 6.8.8 to 6.8.21</li><li>Twitter4J from 4.0.2 to
4.0.3</li><li>XStream from 1.4.7 to 1.4.8<
/li><li>VertX from 2.2.5 to 3.0.0</li><li>ZXing from 3.0.1 to
3.2.0</li></ul><h2
id="Camel2.16.0Release-Importantchangestoconsiderwhenupgrading">Important
changes to consider when upgrading</h2><ul><li>The dumpRoutesAsXml operation
now preserve property placeholder used in the route models. </li><li>Using
setFaultBody / setFaultHeader behaves similar to setBody / setHeader to
preserve existing headers/attachments by setting on existing IN or OUT
message.</li><li>If using concurrent consumer on <a shape="rect"
href="jms.html">JMS</a> endpoints for request/reply over JMS then you must
use the new replyToConcurrentConsumers, replyToMaxConcurrentConsumers options
to configure the values. </li><li>When the <a shape="rect"
href="aggregator2.html">Aggregator2</a> is forced completed the exchange
property <code>Exchange.AGGREGATED_COMPLETED_BY</code> value has been
changed from "forceCompletion" to "force" so its named like the other
completion triggers.</li><l
i>Removed unsupported modules camel-web and
camel-web-standalone.</li><li>Removed unsupported camel:dot functionality from
camel:run plugin.</li><li>Removed unsupported camel-archetype-scala-component
from maven archetypes.</li><li>The Maven coordinate for linkedin and olingo2
components changed to be aligned like all the others having groupId as just
org.apache.camel.</li><li>If using MongoDB component, the option<em>
invokeGetLastError</em> doesn't exist anymore. The option invokeGetLastError
instructs the MongoDB Java driver to invoke <em>getLastError()</em> after every
call. In the 3.0.0 MongoDB driver implementation, the <em>getLastError()</em>
method in WriteResult has been removed. So, if needed, use an acknowledged
WriteConcern when executing the write operation and then verify the correctness
of the operation with the method <em>wasAcknowledged()</em> of
WriteResult.</li><li>The <a shape="rect" href="jing.html">Jing</a>
component now uses <code>jing</code> as sche
ma name in uris, instead of <code>rng</code> or <code>rnc</code>.
Those names has been removed.</li><li><a shape="rect"
href="swagger.html">Swagger</a> module now supports getting api-docs from
multiple camel contexts in the JVM. The entry point at /api-docs now lists the
contexts detected, and you need to append the context id in the path, eg
/api-docs/myCamel</li><li>If using <contextScan> with Spring or Blueprint
to filter RouteBuilder classes, then Camel will now by default only look for
singleton beans. You can turn on the old behavior to include prototype scoped
with the new
option <pre>includeNonSingletons</pre></li><li>camel-vertx has been
upgraded to vertx 3.0 which requires Java 8 at
runtime.</li><li><code>camel-cdi</code> is now using CDI 1.1 api - support for
1.0 has been dropped.</li></ul><h2
id="Camel2.16.0Release-GettingtheDistributions">Getting the
Distributions</h2><h3 id="Camel2.16.0Release-BinaryDistributions">Binary
Distributions</h3><di
v class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>PGP Signature file of
download</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>Windows Distribution</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link"
href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.16.0/apache-camel-2.16.0.zip">apache-camel-2.16.0.zip</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
class="external-link"
href="http://www.apache.org/dist/camel/apache-camel/2.16.0/apache-camel-2.16.0.zip.asc">apache-camel-2.16.0.zip.asc</a></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>Unix/Linux/Cygwin
Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" c
lass="external-link"
href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.16.0/apache-camel-2.16.0.tar.gz">apache-camel-2.16.0.tar.gz</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
class="external-link"
href="http://www.apache.org/dist/camel/apache-camel/2.16.0/apache-camel-2.16.0.tar.gz.asc">apache-camel-2.16.0.tar.gz.asc</a></p></td></tr></tbody></table></div><div
class="confluence-information-macro
confluence-information-macro-information"><p class="title">The above URLs use
redirection</p><span class="aui-icon aui-icon-small aui-iconfont-info
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>The above URLs use the Apache
Mirror system to redirect you to a suitable mirror for your download. Some
users have experienced issues with some versions of browsers (e.g. some Safari
browsers). If the download doesn't seem to work for you from the above URL then
try using <a shape="rect" class="external-li
nk" href="http://www.mozilla.com/en-US/firefox/"
rel="nofollow">FireFox</a></p></div></div><h3
id="Camel2.16.0Release-SourceDistributions">Source Distributions</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>PGP Signature file of
download</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>Source for Windows</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" class="external-link"
href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip">apache-camel-x.y.x-src.zip</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
class="external-link"
href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip.asc">apache-camel-x.y.x-src.zip.asc</a></p
></td></tr></tbody></table></div><div class="table-wrap"><table
>class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Source for Unix/Linux/Cygwin</p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link"
>href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.tar.gz">apache-camel-x.y.x-src.tar.gz</a></p></td><td
> colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
>class="external-link"
>href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.tar.gz.asc">apache-camel-x.y.x-src.tar.gz.asc</a></p></td></tr></tbody></table></div><h3
> id="Camel2.16.0Release-GettingtheBinariesusingMaven2">Getting the Binaries
>using Maven 2</h3><p>To use this release in your maven project, the proper
>dependency configuration that you should use in your <a shape="rect"
>class="external-link"
>href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.htm
l">Maven POM</a> is:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h1
id="Camel2.16.0Release-Camel2.16.0release(currentlyinprogress)">Camel
2.16.0 release (currently in progress)</h1><div
style="padding-right:20px;float:left;margin-left:-20px;"><p><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-external-resource"
src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"
data-image-src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"></span></p></div><div
style="min-height:200px"> </div><h2
id="Camel2.16.0Release-NewandNoteworthy">New and Noteworthy</h2><p>Welcome to
the 2.16.0 release which approx XXX issues resolved (new features, improvements
and bug fixes such as...)</p><p>Noteworthy improvements:</p><ul><li>The route
models (definition classes) preserve property placeholders, which allows round
trip editing, and also prevents showing potential sensitive
information</li><li>Added onPrepareFailure option to <a shape
="rect" href="dead-letter-channel.html">Dead Letter Channel</a> to allow a
custom processor to prepare the Exchange before sending to the dead letter
queue.</li><li><a shape="rect" href="mongodb.html">MongoDB</a> tailable
consumers now allow setting the <code>readPreference</code>
option.</li><li>Using setFaultBody / setFaultHeader behaves similar to setBody
/ setHeader to preserve existing headers/attachments by setting on existing IN
or OUT message.</li><li>Java DSL using choice with end vs endChoice now
validates you use them as intended. Any misconfiguration now throws an
exception explaining the problem.</li><li><a shape="rect"
href="pojo-producing.html">POJO Producing</a> and <a shape="rect"
href="pojo-consuming.html">POJO Consuming</a> lifecycle is now in sync with <a
shape="rect" href="camelcontext.html">CamelContext</a> which ensures it
works as similar to Camel <a shape="rect" href="routes.html">Routes</a>
does. Also the created producer/consumer is stopped
when <a shape="rect" href="camelcontext.html">CamelContext</a> is
stopping to cleanup properly.</li><li><a shape="rect"
href="jms.html">JMS</a> component now allows configuring
concurrentConsumers/maxConcurrentConsumers separately between from(jms) vs
to(jms) using request/reply over JMS</li><li><span><a shape="rect"
class="external-link"
href="https://issues.apache.org/jira/browse/CAMEL-8506">Added SEARCH</a>
operation to Elasticsearch component</span></li><li><span>The <a
shape="rect" href="properties.html">Properties</a> component (property
placeholder) now supports an encoding option to allow reading the .properties
files using a specific charset such as UTF-8. By default ISO-8859-1 is used
(latin1)</span></li><li><span>Added <code>receviveBufferSize</code> option
to the <a shape="rect" href="ftp.html">FTP</a> component to make download
faster. The size is by default 32kb buffer.</span></li><li><span>The <a
shape="rect" href="aggregator2.html">
Aggregator2</a> EIP now allows an external source using
a <code>AggregateController</code> to control the aggregator, such as for
forcing completing a group or all groups, or query runtime information from the
aggregator. A default controller is provided out of the box if none has been
configured.</span></li><li><span>The <a shape="rect"
href="aggregator2.html">Aggregator2</a> now enlists in JMX using
a <code>ManagedAggregateProcessorMBean</code> which has more information,
and also allows using the aggregate controller to control
it.</span></li><li><span>The <a shape="rect"
href="aggregator2.html">Aggregator2</a> now includes more runtime statistics
which can be accessed from Java and JMX about number of incoming and completed
exchanges, and per different completion
triggers.</span></li><li><span>The <a shape="rect"
href="aggregator2.html">Aggregator2</a> now supports pre-completion mode if the
aggregation strategy implements <code>PreCompletionAwareAg
gregationStrategy</code>. This supports the use-case where an incoming
Exchange are used to determine if the current aggregated group is completed or
not. If completed the group is emitted as-is, and the new incoming Exchange is
used to start a new group from scratch.</span></li><li><span>Added options
to <a shape="rect" href="mail.html">Mail</a> consumer so it can skip or
handle a mail message that cannot be read from the mail server in the batch;
and then move on to read the next message. This ensures the consumer can deal
with mail boxes that has problematic mails that otherwise will cause no mails
to be retrieve by the consumer in the batch.</span></li><li>The runtime route
processors and their corresponding model definition are now linked by their id
using <code>HasId</code>, so its easier to obtain the processor or model
definition from the <code>getProcessor(id)</code> and
<code>getProcessorDefintion(id)</code> api on
CamelContext.</li><li>CamelContext now also
includes a getManagedProcessor API to easily get the mbean client api for the
processor, so you can access the runtime JMX statistics from Java
code. </li><li><span><a shape="rect" href="spring-boot.html">Spring
Boot</a> applications now <a shape="rect" class="external-link"
href="https://issues.apache.org/jira/browse/CAMEL-8532">block the main thread
of the execution</a></span></li><li><span><a shape="rect"
href="spring-boot.html">Spring Boot</a> automagically <a shape="rect"
class="external-link"
href="https://issues.apache.org/jira/browse/CAMEL-8523">loads XML routes
definitions</a> from
classpath</span></li><li><span>Added <code>MainListener</code> to make it
easier for Camel Boot / Standalone Camel to implement custom logic to trigger
during the starting and stopping of the
application.</span></li><li><span><span>Camel Jackson now provides <a
shape="rect" class="external-link"
href="https://issues.apache.org/jira/browse/CAMEL-8554"><code>Map</code> to
<code>Object</c
ode> converter</a></span></span></li><li><span>Ability to refer to existing
hazelcast instance by id, using <a shape="rect"
href="hazelcast-component.html">Hazelcast Component</a></span></li><li><a
shape="rect" href="direct.html">Direct</a> and <a shape="rect"
href="direct-vm.html">Direct-VM</a> now supports
the <span>failIfNoConsumers option</span></li><li>Making it easier to add
custom <a shape="rect" href="type-converter.html">Type Converter</a> to
your Camel applications without having to use the META-INF file. In Spring or
Blueprint just add them as <bean>s. See more details at <a
shape="rect" href="type-converter.html">Type Converter</a>
documentation.</li><li>camel-cxf PAYLOAD supports stream cache out of
box.</li><li><p><code>BridgePropertyPlaceholderConfigurer</code> supports to
handle the <span><a shape="rect" href="jasypt.html">jasypt </a>encryption
inside and outside of the camelContext.</span></p></li><li><p>The camel-aws
component now sup
port Amazon DynamoDB version 2<span><br
clear="none"></span></p></li><li><p>The <a shape="rect"
href="wire-tap.html">Wire Tap</a> eip now also emits event notifications when
sending the Exchange to the wire tap destination</p></li><li><a shape="rect"
href="camel-test.html">Camel Test</a> has new option isDumpRouteStats that
dumps all route usage statistics as XML files in target/camel-route-stats
directory, which can be used to inspect "route coverage" reports.</li><li>Now
<a shape="rect" href="netty4.html">Camel Netty</a> component doesn't intercept
consumers with <code>httpMethodRestrict=OPTIONS</code></li><li><span>Now <a
shape="rect" href="netty4-http.html">Netty HTTP</a> resolves OPTIONS prefix
matches earlier</span></li><li>Using <a shape="rect"
href="load-balancer.html">Load Balancer</a> with Java DSL now builds the route
model using the specific model types, which renders a more accurate route
model</li><li>Enhanced the PredicateBuilder to support vargs and list in
the "or" builder method</li><li>Using custom <code>HttpBinding</code>
with <a shape="rect" href="http.html">HTTP</a> and <a shape="rect"
href="http4.html">HTTP4</a> is now easier as they can be instantiated using a
default no-arg constructor</li><li>Added <code>readLock=idempotent</code>
to the <a shape="rect" href="file2.html">File2</a> consumer which allows
to reuse an idempotent repository as read-lock which enables Camel to run
reliable in clustered mode, where each node competes for the same files from a
shared file system. This requires that the idempotent repository supports
clustering such as <a shape="rect"
href="hazelcast-component.html">Hazelcast Component</a> or <a shape="rect"
href="infinispan.html">Infinispan</a> - or using the JDBC for a shared database
table.</li><li><a shape="rect" href="rx.html">Camel RX</a> now ensures that
observe and subscribe are done within an unit of work to ensure on completions
is executed, such as they a
re done when you use regular Camel routes.</li><li>The <a shape="rect"
href="jms.html">JMS</a> component now includes the
underlying <code>javax.jms.Session</code> instance on the Camel message
which allows end users to easier to use client acknowledge mode, in case the
client wants to use the session to call recover or rollback.</li><li>Added
<code>completionEager</code> option to <a shape="rect"
href="idempotent-consumer.html">Idempotent Consumer</a> to whether to complete
the idempotent consumer eager or when the exchange is done.</li><li>Working
with the Camel source code in Eclipse with m2eclipse plugin improved to avoid
endless file changed detection and recompile the source.</li><li>Add
option <code>suppressExceptions</code> to <a shape="rect"
href="jsonpath.html">JSonPath</a> which allows to ignore exceptions such as
NoSuchPathException when the json payload does not contain the path defined in
the json expression.</li><li><a shape="rect" h
ref="spring-boot.html">Spring Boot</a> now creates <code>CamelContext</code>,
<code>ProducerTemplate</code> and <code>ConsumerTemplate</code> beans only if
those are not defined by the
user.  </li><li>New <code>camel-archetype-spring-boot</code> to
create a new Camel Spring Boot project using
Maven.</li><li>New <code>camel-archetype-cdi</code> to create a new
Camel CDI project using Maven.</li><li><a shape="rect"
href="ftp2.html">FTP2</a> doesn't support absolute directories in endpoint
URIs. In such cases, paths will be treated as relative and WARN message will be
printed in logs. In future versions, there'll be no such assumption and
validation exception will be thrown instead.</li><li><a shape="rect"
href="swagger.html">Swagger</a> module now supports getting api-docs from
multiple camel contexts in the JVM. The entry point at /api-docs now lists the
contexts detected, and you need to append the context id in the path, eg
/api-docs/myCamel</li><li><a shap
e="rect" href="ftp2.html">FTP2</a> supports <code>autoCreate=true</code>
for ftp consumers</li><li><a shape="rect" href="rest-dsl.html">Rest DSL</a> now
supports to define parameter using fine grained details for the <a shape="rect"
href="swagger.html">Swagger</a> api documentation. For an example see
the <code>camel-example-servlet-rest-tomcat</code> in the Apache Camel
distribution.</li><li>The <a shape="rect" href="simple.html">Simple</a>
language now has a equals ignore case operator (=~) when comparing with string
values </li><li>If using <contextScan> with Spring or Blueprint to
filter RouteBuilder classes, then Camel will now by default only look for
singleton beans. You can turn on the old behavior to include prototype scoped
with the new option <pre>includeNonSingletons</pre></li><li>The <a
shape="rect" class="external-link"
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/IdempotentRepository.html">Idem
potentRepository</a> now supports clear operation, to clear the repository,
and expose it over JMX.</li><li><a shape="rect"
href="netty4.html">Netty4</a> in clientMode will now automatic re-connect
if the connection was disconnected to the
server.</li><li>The <code>throwException</code> EIP now supports
creating a new exception instance from a simple language expressions, which
allows to make it dynamic based on information from the current
Exchange.</li><li>When using <a shape="rect"
href="expression.html">Expression</a> or <a shape="rect"
href="predicate.html">Predicate</a> in the routes, you can refer to the value
as an external resource by using <strong>resource:classpath:path</strong> or
<strong>resource:file:path</strong> - for example
<code>resource:classpath:com/foo/myscript.groovy</code>.</li><li>Added option
useMessageBodyForSql to the <a shape="rect" href="sql-component.html">SQL
Component</a> which allows to use more dynamic SQL queries inst
ead of the fixed SQL defined in the endpoint uri.</li><li>Added sticky option
to failover <a shape="rect" href="load-balancer.html">Load
Balancer</a> so the load balancer can start from the last known good
endpoint.</li><li>Added option <code>shareUnitOfWork</code> to <a
shape="rect" href="content-enricher.html">Content Enricher</a> eip</li><li><a
shape="rect" href="content-enricher.html">Content Enricher</a> with enrich and
pollEnrich now supports dynamic endpoint uris computed using an <a
shape="rect" href="expression.html">Expression</a> that allows to use values
from the current <a shape="rect" href="exchange.html">Exchange</a> so you
for example can poll a file which name is computed from data from the <a
shape="rect" href="exchange.html">Exchange</a> etc. This change breaks the XML
DSL a little bit and there is an easy migration effort. The Java DSL stays
backwards compatible.</li></ul><p>Fixed the following issues:</p><ul><li>File
language n
ow properly supports file extensions having double dots, such as
.tar.gz</li><li>Fixed issue with doTry not stopping routing if a fault message
was set using setFaultBody within the doTry.</li><li>Fixed <a shape="rect"
href="bean.html">Bean</a> language to support end parenthesis in quoted
string literals as part of method parameters, and not as end of method
signature. </li><li>Fixed <a shape="rect" href="ftp2.html">FTP2</a>
using <code>pollEnrich</code> with disconnect=true and delete=true, would
disconnect before deleting the file. Now we disconnect last.</li><li>Various
EIPs such as <a shape="rect" href="splitter.html">Splitter</a>, <a
shape="rect" href="recipient-list.html">Recipient List</a>, <a
shape="rect" href="multicast.html">Multicast</a> no longer reuse message id in
their sub messages, but each sub message has its own unique message id (just as
the exchange has).</li><li>Fixed an issue with the circuit breaker <a
shape="rect"
href="load-balancer.html">Load Balancer</a> not honoring the half open after
period after an error was detected.</li><li>Fixed <a shape="rect"
href="ftp2.html">FTP2</a> now calling disconnect if there was no messages to
poll, even when disconnect=true configured.</li><li>Fixed <a shape="rect"
href="throttler.html">Throttler</a> using method call expression in XML DSL was
not working</li><li>Fixed stopping a route may stop context
scoped OnException that would otherwise send message to an endpoint, now
been stopped and an IllegalStateException was thrown while handling the
exception.</li><li>Fixed using a <a shape="rect"
href="load-balancer.html">Load Balancer</a> from a context
scoped onException may double up its processors participating in the
balancer per route in the
context.</li><li>Fixed <code>parallelAggregate</code> on
multicast/splitter/recipient list to use a thread pool for running
concurrently. </li><li>Fixed <a shape="rect" href=
"stream-caching.html">Stream caching</a> to not delete data that was spooled
to disk before both exchanges are done routing.</li><li>Fixed <a
shape="rect" href="defaulterrorhandler.html">DefaultErrorHandler</a> to use 1
sec redelivery delay out of the box as the other error handlers
does. </li><li>Fixed
setting <code>logExhaustedMessageHistory=true</code> on <a
shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a> to log the
message history. This option is by default false on DLC as it would be as
before (not noisy).</li><li>Fixed double refresh of the parent Spring Boot
Application Context</li><li>Fixed configuring endpoint uri's with primitive
types when the value is looked up in the registry using #notation would not
work.</li><li>Fixed using transacted in the Scala DSL</li><li>camel-swagger now
filters out older Camel releases that do not support rest-dsl when it discovers
Camel's in the JVM</li><li>Fixed <a shape="rect" href="mail.html">M
ail</a> consumer to use the default value of 60 seconds as poll interval
again, instead of 0.5 sec.</li><li>Fixed <a shape="rect"
href="netty.html">Netty</a> and <a shape="rect"
href="netty4.html">Netty4</a> may perform x2 redelivery when attempting to
redeliver to a netty producer endpoint</li><li>Fixed <a shape="rect"
href="recipient-list.html">Recipient List</a> would not work if using RAW()
syntax in endpoint uri</li></ul><h3 id="Camel2.16.0Release-New">New <a
shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration
Patterns</a></h3><h3 id="Camel2.16.0Release-New.1">New <a shape="rect"
href="components.html">Components</a></h3><ul><li><a shape="rect"
href="paho.html">camel-paho</a> - For MQTT messaging using Eclipse Paho
client</li><li><a shape="rect" href="pdf.html">camel-pdf</a> - For creating PDF
documents</li><li><a shape="rect" href="grape.html">camel-grape</a>
- allows you to fetch, load and manage additional jars when C
amelContext is running.</li><li><a shape="rect"
href="slack.html">camel-slack</a> - allows you to connect to an instance
of Slack and delivers a message contained in the message body via a pre
established Slack incoming webhook.</li><li><a shape="rect"
href="aws-ec2.html">camel-aws-ec2</a> - Component providing support to Amazon
Web Services EC2 </li></ul><h3 id="Camel2.16.0Release-NewDSL">New
DSL</h3><ul><li><a shape="rect" href="script.html">Script</a> - to execute a
script during routing</li></ul><h3 id="Camel2.16.0Release-NewAnnotations">New
Annotations</h3><h3 id="Camel2.16.0Release-NewDataFormats">New <a shape="rect"
href="data-format.html">Data Formats</a></h3><ul><li><a shape="rect"
href="boon.html">camel-boon</a> - For mapping POJO to/from json</li></ul><h3
id="Camel2.16.0Release-New.2">New <a shape="rect"
href="languages.html">Languages</a></h3><h3 id="Camel2.16.0Release-New.3">New
<a shape="rect" href="examples.html">Examples</a></h3><h3 id="Camel2.16.0Rele
ase-New.4">New <a shape="rect" href="tutorials.html">Tutorials</a></h3><h2
id="Camel2.16.0Release-APIbreaking">API breaking</h2><ul><li><p
class="p1"> org.apache.camel.mode.LoadBalancerDefinition no longer
implements org.apache.camel.processor.loadbalancer.LoadBalancer which is
the runtime processor (this was never
intended).</p></li><li>The <code>ref</code> attribute
on <code><loadBalance></code> has been removed, as it has been
deprecated for a long time, and you should use
a <code><customLoadBalancer></code> to refer to a custom load
balancer.</li><li>The <code>copy</code> method
on <code>StreamCache</code> now takes an <code>Exchange</code> as
parameter.</li><li>Various APIs in <code>camel-jms</code> has been
adjusted to support including the JMS session parameter -
<code>javax.jms.Session</code>. Though these API changes are mostly internal
facing, and we do not expect end users problems.</li></ul><h2
id="Camel2.16.0Relea
se-KnownIssues">Known Issues</h2><h2
id="Camel2.16.0Release-Dependencyupgrades">Dependency
upgrades</h2><ul><li>Amazon Web Service Java SDK from 1.8.9.1 to
1.9.40</li><li>Apache Commons Cli from 1.2 to 1.3.1</li><li>Apache Commons
Compress from 1.5 to 1.9</li><li>Apache Commons Lang from 3.3.2 to
3.4</li><li>Apache Deltaspike from 1.3.0 to 1.4.1</li><li>Apache DS from
2.0.0-M19 to 2.0.0-M20</li><li>Apache HttpComponents Core from 4.3.3 to
4.4.1</li><li>Apache HttpComponents Client from 4.3.6 to 4.4.1</li><li>Apache
JClouds from 1.8.1 to 1.9.0</li><li>Apache Olingo Odata from 2.0.0 to
2.0.4</li><li>Apns from 0.2.3 to 1.0.0.Beta6</li><li>AspectJ from 1.6.2 to
1.8.5</li><li>Async-http-client from 1.9.8 to 1.9.26</li><li>Atmosphere from
2.2.6 to 2.3.2</li><li>Cassandra from 2.1.2 to 2.1.6</li><li><p>Cassandra
Datastax Java Driver from 2.1.2 to 2.1.6</p></li><li>Chunk Templates from 2.6.3
to 2.6.4</li><li>DNSJava from 2.1.6 to 2.1.7</li><li>Docker-java from 0.10.5 to
1.3.0</li><li>Dropbo
x core Java SDK from 1.7.6 to 1.7.7</li><li>Dropwizard Metrics from 3.1.0 to
3.1.2</li><li>Ehcache from 2.9.1 to 2.10.0</li><li>Facebook4j from 1.1.12 to
2.2.2</li><li>Freemarker from 2.3.21 to 2.3.22</li><li>Google App Engine from
1.8.3 to 1.9.21</li><li>Gson from 3.2 to 3.2.1</li><li>iCal4j from 1.5.0.2 to
1.6.0</li><li>Hazelcast from 3.4.2 to 3.5</li><li>Infinispan from 6.0.2.Final
to 7.2.3.Final</li><li><span>Jackson2 from 2.4.3 to
2.5.4</span></li><li><span>Jackrabbit from 2.10.0 to
2.10.1</span></li><li><span>Jboss Marshalling from 1.4.4.Final to
1.4.10.Final</span></li><li><span>Jboss Weld from 2.2.4.Final to
2.2.13.Final</span></li><li><span>Jgroups from 3.6.1.Final to
3.6.3.Final</span></li><li><span>Joda-time from 2.5 to
2.8.1</span></li><li><span>Jsch from 0.1.51 to 0.1.53</span></li><li>Jsonpath
from 1.2.0 to 2.0.0</li><li>Kafka from 0.8.1.1 to 0.8.2.0</li><li>LightCouch
from 0.1.3 to 0.1.8</li><li>MongoDB Java Driver from 2.12.4 to
3.0.2</li><li>MongoDB test harness fro
m 1.46.4 to 1.48.0</li><li>Mvel2 from 2.2.1.Final to 2.2.5.Final</li><li>OGNL
from 3.0.8 to 3.0.11</li><li>OpenEJB from 4.6.0.2 to 4.7.2</li><li>OpenJPA from
2.3.0 to 2.4.0</li><li>Openshift Java Client 2.5.0.Final to
2.7.0.Final</li><li>PDFBox from 1.6.0 to 1.8.9</li><li>Restlet from 2.2.x to
2.3.1<span><br clear="none"></span></li><li>SLF4J from 1.7.10 to
1.7.12</li><li>Snakeyaml from 1.14 to 1.15</li><li>Spring upgrades</li><li>Sshd
from 0.13.0 to 0.14.0</li><li>TestNG from 6.8.8 to 6.8.21</li><li>Twitter4J
from 4.0.2 to 4.0.3</li><li>XStream from 1.4.7 to 1.4.8</li><li>VertX from
2.2.5 to 3.0.0</li><li>ZXing from 3.0.1 to 3.2.0</li></ul><h2
id="Camel2.16.0Release-Importantchangestoconsiderwhenupgrading">Important
changes to consider when upgrading</h2><ul><li>The dumpRoutesAsXml operation
now preserve property placeholder used in the route models. </li><li>Using
setFaultBody / setFaultHeader behaves similar to setBody / setHeader to
preserve existing headers/attachments by
setting on existing IN or OUT message.</li><li>If using concurrent consumer
on <a shape="rect" href="jms.html">JMS</a> endpoints for
request/reply over JMS then you must use the new replyToConcurrentConsumers,
replyToMaxConcurrentConsumers options to configure the
values. </li><li>When the <a shape="rect"
href="aggregator2.html">Aggregator2</a> is forced completed the exchange
property <code>Exchange.AGGREGATED_COMPLETED_BY</code> value has been
changed from "forceCompletion" to "force" so its named like the other
completion triggers.</li><li>Removed unsupported modules camel-web and
camel-web-standalone.</li><li>Removed unsupported camel:dot functionality from
camel:run plugin.</li><li>Removed unsupported camel-archetype-scala-component
from maven archetypes.</li><li>The Maven coordinate for linkedin and olingo2
components changed to be aligned like all the others having groupId as just
org.apache.camel.</li><li>If using MongoDB component, the option<em> in
vokeGetLastError</em> doesn't exist anymore. The option invokeGetLastError
instructs the MongoDB Java driver to invoke <em>getLastError()</em> after every
call. In the 3.0.0 MongoDB driver implementation, the <em>getLastError()</em>
method in WriteResult has been removed. So, if needed, use an acknowledged
WriteConcern when executing the write operation and then verify the correctness
of the operation with the method <em>wasAcknowledged()</em> of
WriteResult.</li><li>The <a shape="rect" href="jing.html">Jing</a>
component now uses <code>jing</code> as schema name in uris, instead
of <code>rng</code> or <code>rnc</code>. Those names has been
removed.</li><li><a shape="rect" href="swagger.html">Swagger</a> module now
supports getting api-docs from multiple camel contexts in the JVM. The entry
point at /api-docs now lists the contexts detected, and you need to append the
context id in the path, eg /api-docs/myCamel</li><li>If using
<contextScan> with Spring or
Blueprint to filter RouteBuilder classes, then Camel will now by default only
look for singleton beans. You can turn on the old behavior to include prototype
scoped with the new
option <pre>includeNonSingletons</pre></li><li>camel-vertx has been
upgraded to vertx 3.0 which requires Java 8 at
runtime.</li><li><code>camel-cdi</code> is now using CDI 1.1 api - support for
1.0 has been dropped.</li><li><a shape="rect"
href="content-enricher.html">Content Enricher</a> with enrich and pollEnrich
now supports dynamic endpoint uris computed using an <a shape="rect"
href="expression.html">Expression</a> that allows to use values from the
current <a shape="rect" href="exchange.html">Exchange</a> so you for
example can poll a file which name is computed from data from the <a
shape="rect" href="exchange.html">Exchange</a> etc. This change breaks the XML
DSL a little bit and there is an easy migration effort. The Java DSL stays
backwards compatible.</li><li>Support for
CXF 2.7 is dropped.</li><li>camel-jetty8 is being considered deprecated and we
would like to drop this in a nearby future release as Jetty 8.x is
EOL. </li></ul><h2 id="Camel2.16.0Release-GettingtheDistributions">Getting
the Distributions</h2><h3 id="Camel2.16.0Release-BinaryDistributions">Binary
Distributions</h3><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>Windows
Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" class="external-link"
href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.16.0/apache-camel-2.16.0.zip">apache-camel-2.16.0.zip</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="r
ect" class="external-link"
href="http://www.apache.org/dist/camel/apache-camel/2.16.0/apache-camel-2.16.0.zip.asc">apache-camel-2.16.0.zip.asc</a></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>Unix/Linux/Cygwin
Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" class="external-link"
href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.16.0/apache-camel-2.16.0.tar.gz">apache-camel-2.16.0.tar.gz</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
class="external-link"
href="http://www.apache.org/dist/camel/apache-camel/2.16.0/apache-camel-2.16.0.tar.gz.asc">apache-camel-2.16.0.tar.gz.asc</a></p></td></tr></tbody></table></div><div
class="confluence-information-macro
confluence-information-macro-information"><p class="title">The above URLs use
redirection</p><span class="aui-icon aui-icon-small aui-iconfont-info
confluence-information-macro-icon"></span><div class="confluence-information
-macro-body"><p>The above URLs use the Apache Mirror system to redirect you to
a suitable mirror for your download. Some users have experienced issues with
some versions of browsers (e.g. some Safari browsers). If the download doesn't
seem to work for you from the above URL then try using <a shape="rect"
class="external-link" href="http://www.mozilla.com/en-US/firefox/"
rel="nofollow">FireFox</a></p></div></div><h3
id="Camel2.16.0Release-SourceDistributions">Source Distributions</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>PGP Signature file of
download</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>Source for Windows</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" class="external-link"
href="http://www.apache.org/
dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip">apache-camel-x.y.x-src.zip</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
class="external-link"
href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip.asc">apache-camel-x.y.x-src.zip.asc</a></p></td></tr></tbody></table></div><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>Source for Unix/Linux/Cygwin</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
class="external-link"
href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.tar.gz">apache-camel-x.y.x-src.tar.gz</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
class="external-link"
href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.tar.gz.asc">apache-camel-x.y.x-src.tar.gz.asc</a></p></td></tr></tbody></table></di
v><h3 id="Camel2.16.0Release-GettingtheBinariesusingMaven2">Getting the
Binaries using Maven 2</h3><p>To use this release in your maven project, the
proper dependency configuration that you should use in your <a shape="rect"
class="external-link"
href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html">Maven
POM</a> is:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
Modified: websites/production/camel/content/content-enricher.html
==============================================================================
--- websites/production/camel/content/content-enricher.html (original)
+++ websites/production/camel/content/content-enricher.html Mon Jul 13 11:20:09
2015
@@ -147,7 +147,7 @@ from("direct:resource")
}
]]></script>
-</div></div><p>Using this template the original exchange can be of any
pattern. The resource exchange created by the enricher is always an in-out
exchange.</p><p><strong>Using Spring XML</strong></p><p>The same example in the
Spring DSL</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</div></div><p>Using this template the original exchange can be of any
pattern. The resource exchange created by the enricher is always an in-out
exchange.</p><p><strong>Using Spring XML</strong></p><p>The same example in the
Spring DSL (Camel 2.15 or older)</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<camelContext id="camel"
xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:start"/>
@@ -162,37 +162,108 @@ from("direct:resource")
<bean id="aggregationStrategy" class="..." />
]]></script>
-</div></div><h4 id="ContentEnricher-Aggregationstrategyisoptional">Aggregation
strategy is optional</h4><p>The aggregation strategy is optional. If you do not
provide it Camel will by default just use the body obtained from the
resource.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</div></div><p>The same example in the Spring DSL (Camel 2.16 or
newer)</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<camelContext id="camel"
xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from uri="direct:start"/>
+ <enrich strategyRef="aggregationStrategy">
+ <constant>direct:resource</constant>
+ <to uri="direct:result"/>
+ </route>
+ <route>
+ <from uri="direct:resource"/>
+ ...
+ </route>
+</camelContext>
+
+<bean id="aggregationStrategy" class="..." />
+]]></script>
+</div></div><p> </p><h4
id="ContentEnricher-Aggregationstrategyisoptional">Aggregation strategy is
optional</h4><p>The aggregation strategy is optional. If you do not provide it
Camel will by default just use the body obtained from the resource.</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[from("direct:start")
.enrich("direct:resource")
.to("direct:result");
]]></script>
-</div></div><p>In the route above the message sent to the
<code>direct:result</code> endpoint will contain the output from the
<code>direct:resource</code> as we do not use any custom aggregation.</p><p>And
for Spring DSL just omit the <code>strategyRef</code> attribute:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><p>In the route above the message sent to the
<code>direct:result</code> endpoint will contain the output from the
<code>direct:resource</code> as we do not use any custom aggregation.</p><p>And
for Spring DSL (Camel 2.15 or older) just omit the <code>strategyRef</code>
attribute:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <route>
<from uri="direct:start"/>
<enrich uri="direct:resource"/>
<to uri="direct:result"/>
</route>
]]></script>
+</div></div><p>And for Spring DSL (Camel 2.16 or newer) just omit
the <code>strategyRef</code> attribute:</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <route>
+ <from uri="direct:start"/>
+ <enrich>
+ <constant>direct:resource</constant>
+ </enrich>
+ <to uri="direct:result"/>
+ </route>
+]]></script>
+</div></div><h3 id="ContentEnricher-Usingdynamicuris">Using dynamic
uris</h3><p><strong>Available as of Camel 2.16</strong></p><p>From Camel 2.16
onwards enrich and pollEnrich supports using dynamic uris computed based on
information from the current <a shape="rect"
href="exchange.html">Exchange</a>. For example to enrich from a <a
shape="rect" href="http.html">HTTP</a> endpoint where the header with key
orderId is used as part of the content-path of the HTTP url:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[from("direct:start")
+ .enrich().simple("http:myserver/${header.orderId}/order")
+ .to("direct:result");
+]]></script>
+</div></div><p>And in XML DSL</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <route>
+ <from uri="direct:start"/>
+ <enrich>
+ <simple>http:myserver/${header.orderId}/order</simple>
+ </enrich>
+ <to uri="direct:result"/>
+ </route>
+]]></script>
</div></div><h3 id="ContentEnricher-ContentenrichmentusingpollEnrich">Content
enrichment using <code>pollEnrich</code></h3><p>The <code>pollEnrich</code>
works just as the <code>enrich</code> however as it uses a <a shape="rect"
href="polling-consumer.html">Polling Consumer</a> we have 3 methods when
polling</p><ul
class="alternate"><li>receive</li><li>receiveNoWait</li><li>receive(timeout)</li></ul><h3
id="ContentEnricher-PollEnrichOptions">PollEnrich Options</h3><div
class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>uri</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The endpoint
uri for the external service to enrich from. You must use either
<code>uri</code> or <code>ref</code>. <strong>Important:</strong><span> From
Camel 2.16 onwards, this option is removed, and you use an </span><a
shape="rect" href="expression.html">Expression</a><span> to configure the uri,
such as </span><a shape="rect" href="simple.html">Simple</a><span> or </span><a
shape="rect" href="constant.html">Constant</a><span> or any other dynamic
language that can compute the uri dynamically using values from the current
</span><span> </span><a shape="rect"
href="exchange.html">Exchange</a><span>.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>ref</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Refers to the endpoint for the external
service to enrich from. You must use either <code>uri</code> or
<code>ref</code>. <strong>Important:</strong><span> From Camel 2.16 o
nwards, this option is removed, and you use an </span><a shape="rect"
href="expression.html">Expression</a><span> to configure the uri, such as
</span><a shape="rect" href="simple.html">Simple</a><span> or </span><a
shape="rect" href="constant.html">Constant</a><span> or any other dynamic
language that can compute the uri dynamically using values from the current
</span><span> </span><a shape="rect"
href="exchange.html">Exchange</a><span>.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>expression</code></td><td
colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1"
rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong><span> Mandatory.
The</span><span> </span><a shape="rect"
href="expression.html">Expression</a><span> to configure the uri, such as
</span><a shape="rect" href="simple.html">Simple</a><span> or </span><a
shape="rect" href="constant.html">Constant</a><span> or any other dynamic
language that can compute t
he uri dynamically using values from the current </span><span> </span><a
shape="rect" href="exchange.html">Exchange</a><span>.</span></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>strategyRef</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Refers to an <a shape="rect" class="external-link"
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html">AggregationStrategy</a>
to be used to merge the reply from the external service, into a single
outgoing message. By default Camel will use the reply from the external service
as outgoing message. From <strong>Camel 2.12</strong> onwards you can also use
a POJO as the <code>AggregationStrategy</code>, see the <a shape="rect"
href="aggregator2.html">Aggregate</a> page for more
details.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>st
rategyMethodName</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.12:</strong> This option can be used to
explicit declare the method name to use, when using POJOs as the
<code>AggregationStrategy</code>. See the <a shape="rect"
href="aggregator2.html">Aggregate</a> page for more
details.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>strategyMethodAllowNull</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> If
this option is <code>false</code> then the aggregate method is not used if
there was no data to enrich. If this option is <code>true</code> then
<code>null</code> values is used as the <code>oldExchange</code> (when no data
to enrich), when using POJOs as the <code>AggregationStrategy</code>. See the
<a shape="rect" href="aggre
gator2.html">Aggregate</a> page for more details.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>timeout</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Timeout in millis when polling from the
external service. See below for important details about the
timeout.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>aggregateOnException</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><strong>Camel 2.14:</strong> If this option is
<code>false</code> then the aggregate method is <strong>not</strong> used if
there was an exception thrown while trying to retrieve the data to enrich from
the resource. Setting this option to <code>true</code> allows end users to
control what to do if there was an exception in the <code>aggregate</code>
method. For example to suppress th
e exception or set a custom message body etc.</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><code>cacheSize</code></td><td colspan="1"
rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.16:</strong> <span style="color:
rgb(0,0,0);">Allows to configure the cache size for
the </span><code>ConsumerCache</code><span style="color:
rgb(0,0,0);"> which caches consumers for reuse in the pollEnrich. Will by
default use the default cache size which is 1000. Setting the value to -1
allows to turn off the cache all
together.</span></td></tr></tbody></table></div></div><div
class="confluence-information-macro
confluence-information-macro-information"><p class="title">Good practice to use
timeout value</p><span class="aui-icon aui-icon-small aui-iconfont-info
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>By default Camel will use the
<code>receive</code>. Which may blo
ck until there is a message available. It is therefore recommended to always
provide a timeout value, to make this clear that we may wait for a message,
until the timeout is hit.</p></div></div><p>If there is no data then the
<code>newExchange</code> in the aggregation strategy is
<code>null</code>.</p><p>You can pass in a timeout value that determines which
method to use</p><ul class="alternate"><li>if timeout is -1 or other negative
number then <code>receive</code> is selected (<strong>Important:</strong> the
<code>receive</code> method may block if there is no message)</li><li>if
timeout is 0 then <code>receiveNoWait</code> is selected</li><li>otherwise
<code>receive(timeout)</code> is selected</li></ul><p>The timeout values is in
millis.</p><div class="confluence-information-macro
confluence-information-macro-warning"><p class="title">Camel 2.15 or older -
Data from current Exchange not used</p><span class="aui-icon aui-icon-small
aui-iconfont-error confluence-information-macro-
icon"></span><div
class="confluence-information-macro-body"><p><code>pollEnrich</code> does
<strong>not</strong> access any data from the current <a shape="rect"
href="exchange.html">Exchange</a> which means when polling it cannot use any of
the existing headers you may have set on the <a shape="rect"
href="exchange.html">Exchange</a>. For example you cannot set a filename in the
<code>Exchange.FILE_NAME</code> header and use <code>pollEnrich</code> to
consume only that file. For that you <strong>must</strong> set the filename in
the endpoint URI.</p><p><span>From </span><strong>Camel 2.16</strong><span>
onwards both enrich and pollEnrich supports dynamic endpoints that uses an
</span><a shape="rect" href="expression.html">Expression</a><span> to compute
the uri, which allows to use data from the current </span><a shape="rect"
href="exchange.html">Exchange</a><span>. In other words all what is told above
no longer apply and it just works.</span></p></div></div><h4 id="ContentEnriche
r-Example">Example</h4><p>In this example we enrich the message by loading the
content from the file named inbox/data.txt.</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[from("direct:start")
.pollEnrich("file:inbox?fileName=data.txt")
.to("direct:result");
]]></script>
-</div></div><p>And in XML DSL you do:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And in XML DSL (Camel 2.15 or older) you do:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <route>
<from uri="direct:start"/>
<pollEnrich uri="file:inbox?fileName=data.txt"/>
<to uri="direct:result"/>
</route>
]]></script>
-</div></div><p>If there is no file then the message is empty. We can use a
timeout to either wait (potentially forever) until a file exists, or use a
timeout to wait a certain period.</p><p>For example to wait up to 5 seconds you
can do:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</div></div><p>And in XML DSL (Camel 2.16 or newer) you do:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <route>
+ <from uri="direct:start"/>
+ <pollEnrich>
+ <constant>file:inbox?fileName=data.txt</constant>
+ </pollEnrich>
+ <to uri="direct:result"/>
+ </route>
+]]></script>
+</div></div><p> </p><p>If there is no file then the message is empty. We
can use a timeout to either wait (potentially forever) until a file exists, or
use a timeout to wait a certain period.</p><p>For example to wait up to 5
seconds you can do (Camel 2.15 or older):</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <route>
<from uri="direct:start"/>
<pollEnrich uri="file:inbox?fileName=data.txt"
timeout="5000"/>
<to uri="direct:result"/>
</route>
]]></script>
+</div></div><p>For example to wait up to 5 seconds you can do (Camel 2.16 or
newer):</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <route>
+ <from uri="direct:start"/>
+ <pollEnrich timeout="5000">
+ <constant>file:inbox?fileName=data.txt</constant>
+ </pollEnrich>
+ <to uri="direct:result"/>
+ </route>
+]]></script>
+</div></div><h3 id="ContentEnricher-Usingdynamicuris.1">Using dynamic
uris</h3><p><strong>Available as of Camel 2.16</strong></p><p>From Camel 2.16
onwards enrich and pollEnrich supports using dynamic uris computed based on
information from the current <a shape="rect"
href="exchange.html">Exchange</a>. For example to pollEnrich from an endpoint
that uses a header to indicate a <a shape="rect"
href="seda.html">SEDA</a> queue name:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[from("direct:start")
+ .pollEnrich().simple("seda:${header.name}")
+ .to("direct:result");
+]]></script>
+</div></div><p>And in XML DSL</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <route>
+ <from uri="direct:start"/>
+ <pollEnrich>
+ <simple>seda:${header.name}</simple>
+ </pollEnrich>
+ <to uri="direct:result"/>
+ </route>
+]]></script>
</div></div><p></p><h4 id="ContentEnricher-UsingThisPattern">Using This
Pattern</h4>
<p>If you would like to use this EIP Pattern then please read the <a
shape="rect" href="getting-started.html">Getting Started</a>, you may also find
the <a shape="rect" href="architecture.html">Architecture</a> useful
particularly the description of <a shape="rect"
href="endpoint.html">Endpoint</a> and <a shape="rect"
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect"
href="examples.html">Examples</a> first before trying this pattern
out.</p></div>