Added: websites/production/camel/content/ehcache.html
==============================================================================
--- websites/production/camel/content/ehcache.html (added)
+++ websites/production/camel/content/ehcache.html Tue May 17 15:20:48 2016
@@ -0,0 +1,245 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html>
+<head>
+ <link href="//camel.apache.org/styles/site.css" rel="stylesheet"
type="text/css">
+ <link href="//camel.apache.org/styles/type-settings.css" rel="stylesheet"
type="text/css">
+ <script src="//camel.apache.org/styles/prototype.js"
type="text/javascript"></script>
+ <script src="//camel.apache.org/styles/rico.js"
type="text/javascript"></script>
+ <script src="//camel.apache.org/styles/site.js"
type="text/javascript"></script>
+
+ <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+
+ <style type="text/css">
+ .maincontent { overflow:hidden; }
+ </style>
+ <!--[if IE]>
+ <style type="text/css">
+ .maincontent { width:100%; }
+ </style>
+ <![endif]-->
+
+
+ <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css'
rel='stylesheet' type='text/css' />
+ <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css'
rel='stylesheet' type='text/css' />
+ <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js'
type='text/javascript'></script>
+ <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js'
type='text/javascript'></script>
+ <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js'
type='text/javascript'></script>
+
+ <script type="text/javascript">
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
+
+ <title>
+ Apache Camel: Ehcache
+ </title>
+</head>
+<body>
+<div class="white_box">
+<div class="header">
+ <div class="header_l">
+ <div class="header_r">
+ </div>
+ </div>
+</div>
+<div class="content">
+ <div class="content_l">
+ <div class="content_r">
+ <div>
+ <!-- Banner -->
+<div id="banner-content"><div id="asf_logo">
+ <div id="activemq_logo" style="height:108px; background:transparent
url(banner.data/apache-camel-7.png) no-repeat scroll left top;">
+ <a shape="rect" style="float:left;
width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px;
margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a>
+ <a shape="rect" style="float:right;
width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px;
margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a>
+ </div>
+</div></div>
+ <!-- Banner -->
+ <div class="top_red_bar">
+ <div id="site-breadcrumbs">
+ <!-- Breadcrumbs -->
+<a href="index.html">Apache Camel</a> > <a
href="documentation.html">Documentation</a> > <a
href="components.html">Components</a> > <a
href="ehcache.html">Ehcache</a>
+ </div>
+ <!-- Quicklinks -->
+<div id="site-quicklinks"><p><a shape="rect" href="download.html">Download</a>
| <a shape="rect" href="javadoc.html">JavaDoc</a> | <a shape="rect"
href="source.html">Source</a> | <a shape="rect"
href="discussion-forums.html">Forums</a> | <a shape="rect"
href="support.html">Support</a></p></div>
+ <!-- Quicklinks -->
+ </div>
+
+ <table border="0">
+ <tbody>
+ <tr>
+ <td valign="top" width="100%">
+<div class="wiki-content maincontent"><h2
id="Ehcache-EhcacheComponent">Ehcache Component</h2><p><strong>Available as of
Camel 2.18.x</strong></p><p>The <strong>ehcache</strong> component enables
you to perform caching operations using Ehcache 3 as the Cache
Implementation.</p><p>This component supports producer and event based consumer
endpoints.</p><p>The Cache consumer is an event based consumer and can be used
to listen and respond to specific cache activities. </p><p>Maven users
will need to add the following dependency to
their <code>pom.xml</code> for this component:</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-ehcache</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your Camel core version -->
+</dependency>
+]]></script>
+</div></div><h3 id="Ehcache-URIformat">URI format</h3><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[ehcache://cacheName[?options]
+]]></script>
+</div></div><p>You can append query options to the URI in the following
format, <code>?option=value&option=#beanRef&...</code></p><div><h3
id="Ehcache-Options">Options</h3><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>configUri</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>URI pointing to the Ehcache XML
configuration file's location</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>createCacheIfNotExist</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Configure if a cache need to be cre
ated if it does exist or can't be pre-configured.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>action</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>To configure the default cache
action. If an action is set in the message header, then the operation from the
header takes precedence.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>key</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>To configure the default action key. If a key is set in
the message header, then the key from the header takes
precedence.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>configuration</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The default cache
configuration to be used to create caches if configUri is not
set</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>keyType</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>java.lang.Object</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The cache key type, default
Object.class</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>valueType</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><span style="font-family:
monospace;">java.lang.Object</span></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The cache value type, default
Object.class</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>eventOrdering</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>ORDERED</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Set the the delivery mode (ordered, unordered),
consumer only</p></td></tr><tr><td colspan="1" rowspan="1" class="conflue
nceTd"><p>eventFiring</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>ASYNCHRONOUS</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Set the the delivery mode (synchronous,
asynchronous<span>), consumer only</span></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>eventTypes</p></td><td colspan="1"
rowspan="1"
class="confluenceTd"><p>EVICTED,EXPIRED,REMOVED,CREATED,UPDATED</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Set the type of events to
listen for<span>, consumer only</span></p></td></tr></tbody></table></div><h4
id="Ehcache-MessageHeadersCamel">Message Headers
Camel </h4><p> </p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><span s
tyle="color: rgb(0,0,0);">CamelEhcacheAction</span></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>String</code></span></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color: rgb(0,0,0);">The operation to be
perfomed on the cache, valid options are:</span></p><ul style="list-style-type:
square;"><li><span style="color: rgb(0,0,0);">CLEAR</span></li><li><span
style="color: rgb(0,0,0);">PUT</span></li><li><span style="color:
rgb(0,0,0);">PUT_ALL</span></li><li><span style="color:
rgb(0,0,0);">PUT_IF_ABSENT</span></li><li><span style="color:
rgb(0,0,0);">GET</span></li><li><span style="color:
rgb(0,0,0);">GET_ALL</span></li><li><span style="color:
rgb(0,0,0);">REMOVE</span></li><li><span style="color:
rgb(0,0,0);">REMOVE_ALL</span></li><li><span style="color:
rgb(0,0,0);">REPLACE</span></li></ul></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color: rgb(0,0,0);">CamelEhcacheActio
nHasResult</span></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);">Boolean</span></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color: rgb(0,0,0);">Set to true if the
action has a result</span></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);">CamelEhcacheActionSucceeded</span></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>Boolean</code></span></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color: rgb(0,0,0);">Set to true if the
actionsuccedded</span></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color:
rgb(0,0,0);">CamelEhcacheKey</span></td><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color: rgb(0,0,0);">Object</span></td><td
colspan="1" rowspan="1" class="confluenceTd"><span style="color:
rgb(0,0,0);">The cache key used for an actio
n</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span
style="color: rgb(0,0,0);">CamelEhcacheKeys</span></td><td colspan="1"
rowspan="1" class="confluenceTd"><span style="color:
rgb(0,0,0);">Set<Object></span></td><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color: rgb(0,0,0);">A list of keys, used in
</span><ul><li><span style="color: rgb(0,0,0);">PUT_ALL</span></li><li><span
style="color: rgb(0,0,0);">GET_ALL</span></li><li><span style="color:
rgb(0,0,0);">REMOVE_ALL</span></li></ul></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><span style="color:
rgb(0,0,0);">CamelEhcacheValue</span></td><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color: rgb(0,0,0);">Object</span></td><td
colspan="1" rowspan="1" class="confluenceTd"><span style="color:
rgb(0,0,0);">The value to put in the cache or the result of an
operation</span></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color: rgb(0
,0,0);">CamelEhcacheOldValue</span></td><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color: rgb(0,0,0);">Object</span></td><td
colspan="1" rowspan="1" class="confluenceTd"><span style="color:
rgb(0,0,0);">The old value associated to a key for actions like PUT_IF_ABSENT
or the Object used for comparison for actions like
REPLACE</span></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color:
rgb(0,0,0);">CamelEhcacheEventType</span></td><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color: rgb(0,0,0);">EventType</span></td><td
colspan="1" rowspan="1" class="confluenceTd"><span style="color:
rgb(0,0,0);">The type of event
received</span></td></tr></tbody></table></div><h3
id="Ehcache-Ehcachebasedidempotentrepositoryexample:">Ehcache based idempotent
repository example:</h3><p> </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[CacheManager manager =
CacheManagerBuilder.newCacheManager(new
XmlConfiguration("ehcache.xml"));
+EhcacheIdempotentRepository repo = new EhcacheIdempotentRepository(manager,
"idempotent-cache");
+
+from("direct:in")
+ .idempotentConsumer(header("messageId"), idempotentRepo)
+ .to("mock:out");]]></script>
+</div></div><p> </p><h3
id="Ehcache-Ehcachebasedaggregationrepositoryexample:">Ehcache based
aggregation repository example:</h3><p> </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[public class
EhcacheAggregationRepositoryRoutesTest extends CamelTestSupport {
+ private static final String ENDPOINT_MOCK = "mock:result";
+ private static final String ENDPOINT_DIRECT = "direct:one";
+ private static final int[] VALUES = generateRandomArrayOfInt(10, 0, 30);
+ private static final int SUM = IntStream.of(VALUES).reduce(0, (a, b) ->
a + b);
+ private static final String CORRELATOR = "CORRELATOR";
+
+ @EndpointInject(uri = ENDPOINT_MOCK)
+ private MockEndpoint mock;
+
+ @Produce(uri = ENDPOINT_DIRECT)
+ private ProducerTemplate producer;
+
+ @Test
+ public void checkAggregationFromOneRoute() throws Exception {
+ mock.expectedMessageCount(VALUES.length);
+ mock.expectedBodiesReceived(SUM);
+
+ IntStream.of(VALUES).forEach(
+ i -> producer.sendBodyAndHeader(i, CORRELATOR, CORRELATOR)
+ );
+
+ mock.assertIsSatisfied();
+ }
+
+ private Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
+ if (oldExchange == null) {
+ return newExchange;
+ } else {
+ Integer n = newExchange.getIn().getBody(Integer.class);
+ Integer o = oldExchange.getIn().getBody(Integer.class);
+ Integer v = (o == null ? 0 : o) + (n == null ? 0 : n);
+
+ oldExchange.getIn().setBody(v, Integer.class);
+
+ return oldExchange;
+ }
+ }
+
+ @Override
+ protected RoutesBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from(ENDPOINT_DIRECT)
+ .routeId("AggregatingRouteOne")
+ .aggregate(header(CORRELATOR))
+ .aggregationRepository(createAggregateRepository())
+
.aggregationStrategy(EhcacheAggregationRepositoryRoutesTest.this::aggregate)
+ .completionSize(VALUES.length)
+
.to("log:org.apache.camel.component.ehcache.processor.aggregate.level=INFO&showAll=true&mulltiline=true")
+ .to(ENDPOINT_MOCK);
+ }
+ };
+ }
+
+ protected EhcacheAggregationRepository createAggregateRepository() throws
Exception {
+ CacheManager cacheManager = CacheManagerBuilder.newCacheManager(new
XmlConfiguration("ehcache.xml"));
+ cacheManager.init();
+
+ EhcacheAggregationRepository repository = new
EhcacheAggregationRepository();
+ repository.setCacheManager(cacheManager);
+ repository.setCacheName("aggregate");
+
+ return repository;
+ }
+}
+
+]]></script>
+</div></div></div></div>
+ </td>
+ <td valign="top">
+ <div class="navigation">
+ <div class="navigation_top">
+ <!-- NavigationBar -->
+<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overview"><a shape="rect"
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect"
href="index.html">Home</a></li><li><a shape="rect"
href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li><li><a shape="rect"
href="architecture.html">Architecture</a></li><li><a shape="rect"
href="enterprise-integration-patterns.html">Enterprise
Integration Patterns</a></li><li><a shape="rect"
href="dsl.html">DSL</a></li><li><a shape="rect"
href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
+ <div>
+ <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
+ <input type="hidden" name="ie" value="UTF-8">
+ <input type="text" name="q" size="21">
+ <input type="submit" name="sa" value="Search">
+ </div>
+</form>
+<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Community"><a shape="rect"
href="community.html">Community</a></h3><ul class="alternate"><li><a
shape="rect" href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
>shape="rect" href="source.html">Source</a></li><li><a shape="rect"
>href="building.html">Building</a></li><li><a shape="rect"
>href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
>href="irc-room.html">IRC Room</a></li></ul><h3
>id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
>class="alternate"><li><a shape="rect" class="external-link"
>href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
>class="external-link"
>href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
> shape="rect" class="external-link"
>href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
>shape="rect" class="external-link"
>href="http://www.apache.org/security/">Security</a></li></ul></div>
+ <!-- NavigationBar -->
+ </div>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+
+ <div class="bottom_red_bar"></div>
+ </div>
+ </div>
+ </div>
+</div>
+<div class="black_box">
+<div class="footer">
+ <div class="footer_l">
+ <div class="footer_r">
+ <div>
+ <a href="$base/privacy-policy.html">Privacy Policy</a> -
+ (<a
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=62697244">edit
page</a>)
+ (<a
href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=62697244&showComments=true&showCommentArea=true#addcomment">add
comment</a>)
+ </div>
+ </div>
+ </div>
+</div>
+</div>
+</div>
+<div class="design_attribution">
+© 2004-2015 The Apache Software Foundation.
+<br>
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel
project logo are trademarks of The Apache Software Foundation. All other marks
mentioned may be trademarks or registered trademarks of their respective owners.
+<br>
+<a href="http://hiramchirino.com">Graphic Design By Hiram</a>
+</div>
+
+<!-- Camel committers that would like access to the Analytics, send a note to
[email protected] -->
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-25976253-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript';
ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
+ })();
+
+</script>
+
+</body>
+</html>
+
+
Modified: websites/production/camel/content/idempotent-consumer.html
==============================================================================
--- websites/production/camel/content/idempotent-consumer.html (original)
+++ websites/production/camel/content/idempotent-consumer.html Tue May 17
15:20:48 2016
@@ -86,7 +86,7 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><h3
id="IdempotentConsumer-IdempotentConsumer">Idempotent Consumer</h3><p>The <a
shape="rect" class="external-link"
href="http://www.enterpriseintegrationpatterns.com/IdempotentReceiver.html"
rel="nofollow">Idempotent Consumer</a> from the <a shape="rect"
href="enterprise-integration-patterns.html">EIP patterns</a> is used to filter
out duplicate messages.</p><p>This pattern is implemented using the <a
shape="rect" class="external-link"
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/idempotent/IdempotentConsumer.html">IdempotentConsumer</a>
class. This uses an <a shape="rect" href="expression.html">Expression</a> to
calculate a unique message ID string for a given message exchange; this ID can
then be looked up in the <a shape="rect" class="external-link"
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/IdempotentRepository.html">IdempotentRepository</a>
to see if it h
as been seen before; if it has the message is consumed; if its not then the
message is processed and the ID is added to the repository.</p><p>The
Idempotent Consumer essentially acts like a <a shape="rect"
href="message-filter.html">Message Filter</a> to filter out
duplicates.</p><p>Camel will add the message id eagerly to the repository to
detect duplication also for Exchanges currently in progress.<br clear="none">
On completion Camel will remove the message id from the repository if the
Exchange failed, otherwise it stays there.</p><p>Camel provides the following
Idempotent Consumer implementations:</p><ul
class="alternate"><li>MemoryIdempotentRepository</li><li><a shape="rect"
href="file2.html">FileIdempotentRepository</a></li><li><a shape="rect"
href="hazelcast-component.html">HazelcastIdempotentRepository</a>
(<strong>Available as of Camel 2.8</strong>)</li><li><a shape="rect"
href="sql-component.html">JdbcMessageIdRepository</a> (<strong>Available as of
Camel 2.7</strong>)</l
i><li><a shape="rect" href="jpa.html">JpaMessageIdRepository</a></li><li><p><a
shape="rect" href="infinispan.html">InfinispanIdempotentRepository</a>
(<strong>Available as of Camel 2.13.0)</strong></p></li><li><p><a shape="rect"
href="jcache.html">JCacheIdempotentRepository</a><strong> (<strong>Available
as of Camel 2.17.0)</strong></strong></p></li><li><p><a shape="rect"
href="spring.html">SpringCacheIdempotentRepository</a> <strong>(<strong>Available
as of Camel 2.17.1)</strong></strong><strong><strong><br
clear="none"></strong></strong></p></li></ul><h3
id="IdempotentConsumer-Options">Options</h3><p>The Idempotent Consumer has the
following options:</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="conflu
enceTd"><p>eager</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Eager controls whether Camel adds the message to the
repository before or after the exchange has been processed. If enabled before
then Camel will be able to detect duplicate messages even when messages are
currently in progress. By disabling Camel will only detect duplicates when a
message has successfully been processed.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>messageIdRepositoryRef</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>A reference to a
<code>IdempotentRepository</code> to lookup in the registry. This option is
mandatory when using XML DSL.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>skipDuplicate</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>true</p></td><td colspan="1" rowsp
an="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Sets whether to
skip duplicate messages. If set to <code>false</code> then the message will be
continued. However the <a shape="rect" href="exchange.html">Exchange</a> has
been marked as a duplicate by having the <code>Exchange.DUPLICATE_MESSAG</code>
exchange property set to a <code>Boolean.TRUE</code>
value.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>removeOnFailure</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.9:</strong> Sets whether to remove the
id of an Exchange that failed.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">completionEager</td><td colspan="1" rowspan="1"
class="confluenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.16:</strong> Sets whether to complete
the idempotent consumer eager or when the exchange is done.</p><p>If this optio
n is true to complete eager, then the idempotent consumer will trigger its
completion when the exchange reached the end of the block of the idempotent
consumer pattern. So if the exchange is continued routed after the block ends,
then whatever happens there does not affect the state.</p><p>If this option is
false (default) to not complete eager, then the idempotent consumer will
complete when the exchange is done being routed. So if the exchange is
continued routed after the block ends, then whatever happens there also affect
the state. For example if the exchange failed due to an exception, then the
state of the idempotent consumer will be a
rollback.</p></td></tr></tbody></table></div><h3
id="IdempotentConsumer-Usingthe"><strong>Using the <a shape="rect"
href="fluent-builders.html">Fluent Builders</a></strong></h3><p>The following
example will use the header <strong>myMessageId</strong> to filter out
duplicates</p><div class="code panel pdl" style="border-width: 1px;"><div
class="
codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h3
id="IdempotentConsumer-IdempotentConsumer">Idempotent Consumer</h3><p>The <a
shape="rect" class="external-link"
href="http://www.enterpriseintegrationpatterns.com/IdempotentReceiver.html"
rel="nofollow">Idempotent Consumer</a> from the <a shape="rect"
href="enterprise-integration-patterns.html">EIP patterns</a> is used to filter
out duplicate messages.</p><p>This pattern is implemented using the <a
shape="rect" class="external-link"
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/idempotent/IdempotentConsumer.html">IdempotentConsumer</a>
class. This uses an <a shape="rect" href="expression.html">Expression</a> to
calculate a unique message ID string for a given message exchange; this ID can
then be looked up in the <a shape="rect" class="external-link"
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/IdempotentRepository.html">IdempotentRepository</a>
to see if it h
as been seen before; if it has the message is consumed; if its not then the
message is processed and the ID is added to the repository.</p><p>The
Idempotent Consumer essentially acts like a <a shape="rect"
href="message-filter.html">Message Filter</a> to filter out
duplicates.</p><p>Camel will add the message id eagerly to the repository to
detect duplication also for Exchanges currently in progress.<br clear="none">
On completion Camel will remove the message id from the repository if the
Exchange failed, otherwise it stays there.</p><p>Camel provides the following
Idempotent Consumer implementations:</p><ul
class="alternate"><li>MemoryIdempotentRepository</li><li><a shape="rect"
href="file2.html">FileIdempotentRepository</a></li><li><a shape="rect"
href="hazelcast-component.html">HazelcastIdempotentRepository</a>
(<strong>Available as of Camel 2.8</strong>)</li><li><a shape="rect"
href="sql-component.html">JdbcMessageIdRepository</a> (<strong>Available as of
Camel 2.7</strong>)</l
i><li><a shape="rect" href="jpa.html">JpaMessageIdRepository</a></li><li><p><a
shape="rect" href="infinispan.html">InfinispanIdempotentRepository</a>
(<strong>Available as of Camel 2.13.0)</strong></p></li><li><p><a shape="rect"
href="jcache.html">JCacheIdempotentRepository</a><strong> (<strong>Available
as of Camel 2.17.0)</strong></strong></p></li><li><p><a shape="rect"
href="spring.html">SpringCacheIdempotentRepository</a> <strong>(<strong>Available
as of Camel 2.17.1)</strong></strong><strong><strong><br
clear="none"></strong></strong></p></li><li><p><strong><strong><a shape="rect"
href="ehcache.html">EhcacheIdempotentRepository</a> <strong>(<strong>Available
as of Camel 2.18.0)</strong></strong><br
clear="none"></strong></strong></p></li></ul><h3
id="IdempotentConsumer-Options">Options</h3><p>The Idempotent Consumer has the
following options:</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>O
ption</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>eager</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Eager controls whether Camel adds the message to the
repository before or after the exchange has been processed. If enabled before
then Camel will be able to detect duplicate messages even when messages are
currently in progress. By disabling Camel will only detect duplicates when a
message has successfully been processed.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>messageIdRepositoryRef</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>A reference to a
<code>IdempotentRepository</code> to lookup in the registry. This option is man
datory when using XML DSL.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>skipDuplicate</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.8:</strong> Sets whether to skip
duplicate messages. If set to <code>false</code> then the message will be
continued. However the <a shape="rect" href="exchange.html">Exchange</a> has
been marked as a duplicate by having the <code>Exchange.DUPLICATE_MESSAG</code>
exchange property set to a <code>Boolean.TRUE</code>
value.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>removeOnFailure</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.9:</strong> Sets whether to remove the
id of an Exchange that failed.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">completionEager</td><td colspan="1" rowspan="1"
class="confl
uenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.16:</strong> Sets whether to complete
the idempotent consumer eager or when the exchange is done.</p><p>If this
option is true to complete eager, then the idempotent consumer will trigger its
completion when the exchange reached the end of the block of the idempotent
consumer pattern. So if the exchange is continued routed after the block ends,
then whatever happens there does not affect the state.</p><p>If this option is
false (default) to not complete eager, then the idempotent consumer will
complete when the exchange is done being routed. So if the exchange is
continued routed after the block ends, then whatever happens there also affect
the state. For example if the exchange failed due to an exception, then the
state of the idempotent consumer will be a
rollback.</p></td></tr></tbody></table></div><h3
id="IdempotentConsumer-Usingthe"><strong>Using the <a shape="rect"
href="fluent-builders.html
">Fluent Builders</a></strong></h3><p>The following example will use the
header <strong>myMessageId</strong> to filter out duplicates</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[
RouteBuilder builder = new RouteBuilder() {
public void configure() {
Modified: websites/production/camel/content/transport.html
==============================================================================
--- websites/production/camel/content/transport.html (original)
+++ websites/production/camel/content/transport.html Tue May 17 15:20:48 2016
@@ -221,7 +221,9 @@ disruptor-vm:someName[?<option>]
</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><span
style="color: rgb(0,0,0);">The </span> <strong>dropbox:</strong> <span
style="color: rgb(0,0,0);"> component allows you to treat </span> <a
shape="rect" class="external-link" href="https://www.dropbox.com/"
rel="nofollow">Dropbox</a> <span style="color: rgb(0,0,0);"> remote
folders as a producer or consumer of messages.</span></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
href="ejb.html">EJB</a> / camel-ejb</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[ejb:ejbName[?options]
]]></script>
-</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Uses the
<a shape="rect" href="bean-binding.html">Bean Binding</a> to bind message
exchanges to EJBs. It works like the <a shape="rect" href="bean.html">Bean</a>
component but just for accessing EJBs. Supports EJB 3.0
onwards.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="elasticsearch.html">ElasticSearch</a> / camel-elasticsearch</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Uses the
<a shape="rect" href="bean-binding.html">Bean Binding</a> to bind message
exchanges to EJBs. It works like the <a shape="rect" href="bean.html">Bean</a>
component but just for accessing EJBs. Supports EJB 3.0
onwards.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="ehcache.html">Ehcache</a> /
camel-ehcache</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="brush: plain; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ehcache://cacheName[?options]]]></script>
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><span>The
cache component facilitates creation of caching endpoints and processors using
</span><a shape="rect" class="external-link" href="http://ehcache.org/"
rel="nofollow">Ehcache 3</a><span> as the cache
implementation.</span></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="elasticsearch.html">ElasticSearch</a> / camel-elasticsearch</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
<script class="brush: plain; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[elasticsearch://clusterName[?options]
]]></script>
</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For
interfacing with an <a shape="rect" class="external-link"
href="http://elasticsearch.org" rel="nofollow">ElasticSearch</a>
server.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="etcd.html">Etcd</a> / camel-etcd</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
Modified: websites/production/camel/content/uris.html
==============================================================================
--- websites/production/camel/content/uris.html (original)
+++ websites/production/camel/content/uris.html Tue May 17 15:20:48 2016
@@ -226,7 +226,9 @@ disruptor-vm:someName[?<option>]
</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><span
style="color: rgb(0,0,0);">The </span> <strong>dropbox:</strong> <span
style="color: rgb(0,0,0);"> component allows you to treat </span> <a
shape="rect" class="external-link" href="https://www.dropbox.com/"
rel="nofollow">Dropbox</a> <span style="color: rgb(0,0,0);"> remote
folders as a producer or consumer of messages.</span></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
href="ejb.html">EJB</a> / camel-ejb</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[ejb:ejbName[?options]
]]></script>
-</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Uses the
<a shape="rect" href="bean-binding.html">Bean Binding</a> to bind message
exchanges to EJBs. It works like the <a shape="rect" href="bean.html">Bean</a>
component but just for accessing EJBs. Supports EJB 3.0
onwards.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="elasticsearch.html">ElasticSearch</a> / camel-elasticsearch</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Uses the
<a shape="rect" href="bean-binding.html">Bean Binding</a> to bind message
exchanges to EJBs. It works like the <a shape="rect" href="bean.html">Bean</a>
component but just for accessing EJBs. Supports EJB 3.0
onwards.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="ehcache.html">Ehcache</a> /
camel-ehcache</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="brush: plain; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ehcache://cacheName[?options]]]></script>
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><span>The
cache component facilitates creation of caching endpoints and processors using
</span><a shape="rect" class="external-link" href="http://ehcache.org/"
rel="nofollow">Ehcache 3</a><span> as the cache
implementation.</span></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="elasticsearch.html">ElasticSearch</a> / camel-elasticsearch</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
<script class="brush: plain; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[elasticsearch://clusterName[?options]
]]></script>
</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For
interfacing with an <a shape="rect" class="external-link"
href="http://elasticsearch.org" rel="nofollow">ElasticSearch</a>
server.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="etcd.html">Etcd</a> / camel-etcd</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">