Modified: websites/production/camel/content/leveldb.html
==============================================================================
--- websites/production/camel/content/leveldb.html (original)
+++ websites/production/camel/content/leveldb.html Wed Feb 10 02:21:11 2016
@@ -86,45 +86,7 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="LevelDB-LevelDB">LevelDB</h2>
-<p><strong>Available as of Camel 2.10</strong></p>
-
-<p><a shape="rect" class="external-link" 
href="https://code.google.com/p/leveldb/"; rel="nofollow">Leveldb</a> is a very 
lightweight and embedable key value database. It allows together with Camel to 
provide persistent support for various Camel features such as <a shape="rect" 
href="aggregator2.html">Aggregator</a>. </p>
-
-<p>Current features it provides:</p>
-<ul class="alternate"><li>LevelDBAggregationRepository</li></ul>
-
-
-<h3 id="LevelDB-UsingLevelDBAggregationRepository">Using 
LevelDBAggregationRepository</h3>
-<p><code>LevelDBAggregationRepository</code> is an 
<code>AggregationRepository</code> which on the fly persists the aggregated 
messages. This ensures that you will not loose messages, as the default 
aggregator will use an in memory only <code>AggregationRepository</code>.</p>
-
-<p>It 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> Type </p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>repositoryName</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> A mandatory 
repository name. Allows you to use a shared <code>LevelDBFile</code> for 
multiple repositories. </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>persistentFileName</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> String </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Filename for the persistent 
storage. If no file exists on startup a new file is created. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p
 > <code>levelDBFile</code> </p></td><td colspan="1" rowspan="1" 
 > class="confluenceTd"><p> LevelDBFile </p></td><td colspan="1" rowspan="1" 
 > class="confluenceTd"><p> Use an existing configured 
 > <code>org.apache.camel.component.leveldb.LevelDBFile</code> instance. 
 > </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
 > <code>sync</code> </p></td><td colspan="1" rowspan="1" 
 > class="confluenceTd"><p> boolean </p></td><td colspan="1" rowspan="1" 
 > class="confluenceTd"><p> <strong>Camel 2.12:</strong> Whether or not the 
 > LevelDBFile should sync on write or not. Default is false. By sync on write 
 > ensures that its always waiting for all writes to be spooled to disk and 
 > thus will not loose updates. See <a shape="rect" class="external-link" 
 > href="http://leveldb.googlecode.com/svn/trunk/doc/index.html"; 
 > rel="nofollow">LevelDB docs</a> for more details about async vs sync writes. 
 > </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
 > <code>returnOldExchange</code> </p></t
 d><td colspan="1" rowspan="1" class="confluenceTd"><p> boolean </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Whether the get operation 
should return the old existing Exchange if any existed. By default this option 
is <code>false</code> to optimize as we do not need the old exchange when 
aggregating. </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>useRecovery</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> boolean </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> Whether or not recovery is enabled. This 
option is by default <code>true</code>. When enabled the Camel <a shape="rect" 
href="aggregator2.html">Aggregator</a> automatic recover failed aggregated 
exchange and have them resubmitted. </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>recoveryInterval</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> long </p></td><td colspan="1" 
rowspan="1" class="confluenc
 eTd"><p> If recovery is enabled then a background task is run every x'th time 
to scan for failed exchanges to recover and resubmit. By default this interval 
is 5000 millis. </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>maximumRedeliveries</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> int </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> Allows you to limit the maximum number of 
redelivery attempts for a recovered exchange. If enabled then the Exchange will 
be moved to the dead letter channel if all redelivery attempts failed. By 
default this option is disabled. If this option is used then the 
<code>deadLetterUri</code> option must also be provided. </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>deadLetterUri</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> An endpoint uri 
for a <a shape="rect" href="d
 ead-letter-channel.html">Dead Letter Channel</a> where exhausted recovered 
Exchanges will be moved. If this option is used then the 
<code>maximumRedeliveries</code> option must also be provided. 
</p></td></tr></tbody></table></div>
-
-
-<p>The <code>repositoryName</code> option must be provided. Then either the 
<code>persistentFileName</code> or the <code>levelDBFile</code> must be 
provided.</p>
-
-<h3 id="LevelDB-Whatispreservedwhenpersisting">What is preserved when 
persisting</h3>
-<p><code>LevelDBAggregationRepository</code> will only preserve any 
<code>Serializable</code> compatible data types. If a data type is not such a 
type its dropped and a <code>WARN</code> is logged. And it only persists the 
<code>Message</code> body and the <code>Message</code> headers. The 
<code>Exchange</code> properties are <strong>not</strong> persisted. </p>
-
-<h3 id="LevelDB-Recovery">Recovery</h3>
-<p>The <code>LevelDBAggregationRepository</code> will by default recover any 
failed <a shape="rect" href="exchange.html">Exchange</a>. It does this by 
having a background tasks that scans for failed <a shape="rect" 
href="exchange.html">Exchange</a>s in the persistent store. You can use the 
<code>checkInterval</code> option to set how often this task runs. The recovery 
works as transactional which ensures that Camel will try to recover and 
redeliver the failed <a shape="rect" href="exchange.html">Exchange</a>. Any <a 
shape="rect" href="exchange.html">Exchange</a> which was found to be recovered 
will be restored from the persistent store and resubmitted and send out again. 
</p>
-
-<p>The following headers is set when an <a shape="rect" 
href="exchange.html">Exchange</a> is being recovered/redelivered:</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> 
<code>Exchange.REDELIVERED</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Boolean </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Is set to true to indicate the <a shape="rect" 
href="exchange.html">Exchange</a> is being redelivered. </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>Exchange.REDELIVERY_COUNTER</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Integer </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> The redelivery attempt, starting from 1. 
</p></td></tr></tbody></table></div>
-
-
-<p>Only when an <a shape="rect" href="exchange.html">Exchange</a> has been 
successfully processed it will be marked as complete which happens when the 
<code>confirm</code> method is invoked on the 
<code>AggregationRepository</code>. This means if the same <a shape="rect" 
href="exchange.html">Exchange</a> fails again it will be kept retried until it 
success.</p>
-
-<p>You can use option <code>maximumRedeliveries</code> to limit the maximum 
number of redelivery attempts for a given recovered <a shape="rect" 
href="exchange.html">Exchange</a>. You must also set the 
<code>deadLetterUri</code> option so Camel knows where to send the <a 
shape="rect" href="exchange.html">Exchange</a> when the 
<code>maximumRedeliveries</code> was hit. </p>
-
-<p>You can see some examples in the unit tests of camel-leveldb, for example 
<a shape="rect" class="external-link" 
href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverTest.java";>this
 test</a>.</p>
-
-
-<h4 id="LevelDB-UsingLevelDBAggregationRepositoryinJavaDSL">Using 
LevelDBAggregationRepository in Java DSL</h4>
-<p>In this example we want to persist aggregated messages in the 
<code>target/data/leveldb.dat</code> file.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<div class="wiki-content maincontent"><h2 
id="LevelDB-LevelDB">LevelDB</h2><p><strong>Available as of Camel 
2.10</strong></p><p><a shape="rect" class="external-link" 
href="https://code.google.com/p/leveldb/"; rel="nofollow">Leveldb</a> is a very 
lightweight and embedable key value database. It allows together with Camel to 
provide persistent support for various Camel features such as <a shape="rect" 
href="aggregator2.html">Aggregator</a>.</p><p>Current features it 
provides:</p><ul 
class="alternate"><li>LevelDBAggregationRepository</li></ul><h3 
id="LevelDB-UsingLevelDBAggregationRepository">Using 
LevelDBAggregationRepository</h3><p><code>LevelDBAggregationRepository</code> 
is an <code>AggregationRepository</code> which on the fly persists the 
aggregated messages. This ensures that you will not loose messages, as the 
default aggregator will use an in memory only 
<code>AggregationRepository</code>.</p><p>It has the following options:</p><div 
class="table-wrap"><table class="confluenceTa
 ble"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Option</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><code>repositoryName</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>A mandatory repository name. Allows you to 
use a shared <code>LevelDBFile</code> for multiple 
repositories.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>persistentFileName</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Filename for the persistent storage. If no file exists 
on startup a new file is created.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>levelDBFile</code></p></td><td colspan="1" 
rowspan="1" class=
 "confluenceTd"><p>LevelDBFile</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Use an existing configured 
<code>org.apache.camel.component.leveldb.LevelDBFile</code> 
instance.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>sync</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.12:</strong> Whether or not the 
LevelDBFile should sync on write or not. Default is false. By sync on write 
ensures that its always waiting for all writes to be spooled to disk and thus 
will not loose updates. See <a shape="rect" class="external-link" 
href="http://leveldb.googlecode.com/svn/trunk/doc/index.html"; 
rel="nofollow">LevelDB docs</a> for more details about async vs sync 
writes.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>returnOldExchange</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan=
 "1" rowspan="1" class="confluenceTd"><p>Whether the get operation should 
return the old existing Exchange if any existed. By default this option is 
<code>false</code> to optimize as we do not need the old exchange when 
aggregating.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>useRecovery</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Whether or not recovery is enabled. This option is by 
default <code>true</code>. When enabled the Camel <a shape="rect" 
href="aggregator2.html">Aggregator</a> automatic recover failed aggregated 
exchange and have them resubmitted.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>recoveryInterval</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>long</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If recovery is enabled then a background 
task is run every x'th time to scan for failed 
 exchanges to recover and resubmit. By default this interval is 5000 
millis.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>maximumRedeliveries</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>int</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Allows you to limit the maximum number of 
redelivery attempts for a recovered exchange. If enabled then the Exchange will 
be moved to the dead letter channel if all redelivery attempts failed. By 
default this option is disabled. If this option is used then the 
<code>deadLetterUri</code> option must also be provided.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>deadLetterUri</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>An endpoint uri for a <a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a> where exhausted 
recovered Exchanges will be moved. If this o
 ption is used then the <code>maximumRedeliveries</code> option must also be 
provided.</p></td></tr></tbody></table></div><p>The <code>repositoryName</code> 
option must be provided. Then either the <code>persistentFileName</code> or the 
<code>levelDBFile</code> must be provided.</p><h3 
id="LevelDB-Whatispreservedwhenpersisting">What is preserved when 
persisting</h3><p><code>LevelDBAggregationRepository</code> will only preserve 
any <code>Serializable</code> compatible message body data types. Message 
headers must be primitive / string / numbers / etc. If a data type is not such 
a type its dropped and a <code>WARN</code> is logged. And it only persists the 
<code>Message</code> body and the <code>Message</code> headers. The 
<code>Exchange</code> properties are <strong>not</strong> persisted.</p><h3 
id="LevelDB-Recovery">Recovery</h3><p>The 
<code>LevelDBAggregationRepository</code> will by default recover any failed <a 
shape="rect" href="exchange.html">Exchange</a>. It does this by havi
 ng a background tasks that scans for failed <a shape="rect" 
href="exchange.html">Exchange</a>s in the persistent store. You can use the 
<code>checkInterval</code> option to set how often this task runs. The recovery 
works as transactional which ensures that Camel will try to recover and 
redeliver the failed <a shape="rect" href="exchange.html">Exchange</a>. Any <a 
shape="rect" href="exchange.html">Exchange</a> which was found to be recovered 
will be restored from the persistent store and resubmitted and send out 
again.</p><p>The following headers is set when an <a shape="rect" 
href="exchange.html">Exchange</a> is being recovered/redelivered:</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><code>Exchang
 e.REDELIVERED</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Boolean</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Is set to true to indicate the <a shape="rect" 
href="exchange.html">Exchange</a> is being redelivered.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Exchange.REDELIVERY_COUNTER</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Integer</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The redelivery attempt, starting from 
1.</p></td></tr></tbody></table></div><p>Only when an <a shape="rect" 
href="exchange.html">Exchange</a> has been successfully processed it will be 
marked as complete which happens when the <code>confirm</code> method is 
invoked on the <code>AggregationRepository</code>. This means if the same <a 
shape="rect" href="exchange.html">Exchange</a> fails again it will be kept 
retried until it success.</p><p>You can use option 
<code>maximumRedeliveries</code> to limit the 
 maximum number of redelivery attempts for a given recovered <a shape="rect" 
href="exchange.html">Exchange</a>. You must also set the 
<code>deadLetterUri</code> option so Camel knows where to send the <a 
shape="rect" href="exchange.html">Exchange</a> when the 
<code>maximumRedeliveries</code> was hit.</p><p>You can see some examples in 
the unit tests of camel-leveldb, for example <a shape="rect" 
class="external-link" 
href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverTest.java";>this
 test</a>.</p><h4 id="LevelDB-UsingLevelDBAggregationRepositoryinJavaDSL">Using 
LevelDBAggregationRepository in Java DSL</h4><p>In this example we want to 
persist aggregated messages in the <code>target/data/leveldb.dat</code> 
file.</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 void configure() throws Exception {
     // create the leveldb repo
@@ -138,12 +100,7 @@ public void configure() throws Exception
             .to(&quot;mock:aggregated&quot;);
 }
 ]]></script>
-</div></div>
-
-<h4 id="LevelDB-UsingLevelDBAggregationRepositoryinSpringXML">Using 
LevelDBAggregationRepository in Spring XML</h4>
-<p>The same example but using Spring XML instead:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h4 
id="LevelDB-UsingLevelDBAggregationRepositoryinSpringXML">Using 
LevelDBAggregationRepository in Spring XML</h4><p>The same example but using 
Spring XML instead:</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[
 
 &lt;!-- a persistent aggregation repository using camel-leveldb --&gt;
@@ -173,28 +130,15 @@ public void configure() throws Exception
 
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<h3 id="LevelDB-Dependencies">Dependencies</h3>
-
-<p>To use <a shape="rect" href="leveldb.html">LevelDB</a> in your camel routes 
you need to add the a dependency on <strong>camel-leveldb</strong>. </p>
-
-<p>If you use maven you could just add the following to your pom.xml, 
substituting the version number for the latest &amp; greatest release (see <a 
shape="rect" href="download.html">the download page for the latest 
versions</a>).</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[
-&lt;dependency&gt;
+</div></div><h3 id="LevelDB-Dependencies">Dependencies</h3><p>To use <a 
shape="rect" href="leveldb.html">LevelDB</a> in your camel routes you need to 
add the a dependency on <strong>camel-leveldb</strong>.</p><p>If you use maven 
you could just add the following to your pom.xml, substituting the version 
number for the latest &amp; greatest release (see <a shape="rect" 
href="download.html">the download page for the latest versions</a>).</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[&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-leveldb&lt;/artifactId&gt;
   &lt;version&gt;2.10.0&lt;/version&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-
-<h3 id="LevelDB-SeeAlso">See Also</h3>
-<ul><li><a shape="rect" href="configuring-camel.html">Configuring 
Camel</a></li><li><a shape="rect" 
href="component.html">Component</a></li><li><a shape="rect" 
href="endpoint.html">Endpoint</a></li><li><a shape="rect" 
href="getting-started.html">Getting Started</a></li></ul>
-<ul class="alternate"><li><a shape="rect" 
href="aggregator2.html">Aggregator</a></li><li><a shape="rect" 
href="hawtdb.html">HawtDB</a></li><li><a shape="rect" 
href="components.html">Components</a></li></ul></div>
+</div></div><p></p><h3 id="LevelDB-SeeAlso">See Also</h3>
+<ul><li><a shape="rect" href="configuring-camel.html">Configuring 
Camel</a></li><li><a shape="rect" 
href="component.html">Component</a></li><li><a shape="rect" 
href="endpoint.html">Endpoint</a></li><li><a shape="rect" 
href="getting-started.html">Getting Started</a></li></ul><ul 
class="alternate"><li><a shape="rect" 
href="aggregator2.html">Aggregator</a></li><li><a shape="rect" 
href="hawtdb.html">HawtDB</a></li><li><a shape="rect" 
href="components.html">Components</a></li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">


Reply via email to