[CONF] Apache Camel HawtDB

2013-04-17 Thread confluence







HawtDB
Page edited by Claus Ibsen


 Changes (2)
 




...
[HawtDB|http://hawtdb.fusesource.org/] is a very lightweight and embedable key value database. It allows together with Camel to provide persistent support for various Camel features such as [Aggregator|Aggregator2].   
{info:title=Deprecated} The [HawtDB|http://hawtdb.fusesource.org/]  project is being deprecated and replaced by [leveldb|https://code.google.com/p/leveldb/] as the lightweight and embedable key value database. To make using leveldb easy there is a [leveldbjni|https://github.com/fusesource/leveldbjni] project for that. The Apache ActiveMQ project is planning on using leveldb as their primary file based message store in the future, to replace kahadb. {info}  
{warning:title=Issue with HawtDB 1.4 or older} There is a bug in HawtDB 1.4 or older which means the filestore will not free unused space. That means the file keeps growing. This has been fixed in HawtDB 1.5 which is shipped with Camel 2.5 onwards. 
...
{include:Endpoint See Also} - [Aggregator|Aggregator2] 
- [JDBC-AggregationRepository] 
- [Components] 


Full Content

HawtDB
Available as of Camel 2.3

HawtDB is a very lightweight and embedable key value database. It allows together with Camel to provide persistent support for various Camel features such as Aggregator. 

DeprecatedThe HawtDB  project is being deprecated and replaced by leveldb as the lightweight and embedable key value database. To make using leveldb easy there is a leveldbjni project for that. The Apache ActiveMQ project is planning on using leveldb as their primary file based message store in the future, to replace kahadb.

Issue with HawtDB 1.4 or olderThere is a bug in HawtDB 1.4 or older which means the filestore will not free unused space. That means the file keeps growing. This has been fixed in HawtDB 1.5 which is shipped with Camel 2.5 onwards.


Current features it provides:

	HawtDBAggregationRepository



Using HawtDBAggregationRepository
HawtDBAggregationRepository is an AggregationRepository 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 AggregationRepository.

It has the following options:



 Option 
 Type 
 Description 


 repositoryName 
 String 
 A mandatory repository name. Allows you to use a shared HawtDBFile for multiple repositories. 


 persistentFileName 
 String 
 Filename for the persistent storage. If no file exists on startup a new file is created. 


 bufferSize 
 int 
 The size of the memory segment buffer which is mapped to the file store. By default its 8mb. The value is in bytes. 


 sync 
 boolean 
 Whether or not the HawtDBFile should sync on write or not. Default is true. By sync on write ensures that its always waiting for all writes to be spooled to disk and thus will not loose updates. If you disable this option, then HawtDB will auto sync when it has batched up a number of writes. 


 pageSize 
 short 
 The size of memory pages. By default its 512 bytes. The value is in bytes. 


 hawtDBFile 
 HawtDBFile 
 Use an existing configured org.apache.camel.component.hawtdb.HawtDBFile instance. 


 returnOldExchange 
 boolean 
 Whether the get operation should return the old existing Exchange if any existed. By default this option is false to optimize as we do not need the old exchange when aggregating. 


 useRecovery 
 boolean 
 Whether or not recovery is enabled. This option is by default true. When enabled the Camel Aggregator automatic recover failed aggregated exchange and have them resubmitted. 


 recoveryInterval 
 long 
 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. 


 maximumRedeliveries 
 int 
 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 deadLetterUri option must also be provided. 


 deadLetterUri 
 String 
 An endpoint uri for a Dead Letter Channel where exhausted recovered Exchanges will be moved. If this option is used then the maximumRedeliveries option must also be provided. 





The repositoryName option must be provided. Then either the persistentFileName or the hawtDBFile must be provided.

What is preserved when persisting
HawtDBAggregationRepository will only preserve any Serializable compatible data types. If a data type is not such a type its dropped and a WARN is logged. And it only persists the Message body and the Message 

svn commit: r1468764 - /camel/tags/camel-2.11.0/

2013-04-17 Thread cmueller
Author: cmueller
Date: Wed Apr 17 06:45:52 2013
New Revision: 1468764

URL: http://svn.apache.org/r1468764
Log:
[maven-release-plugin]  copy for tag camel-2.11.0

Added:
camel/tags/camel-2.11.0/
  - copied from r1468763, camel/trunk/



svn commit: r858797 - in /websites/production/camel/content: cache/main.pageCache hawtdb.html

2013-04-17 Thread buildbot
Author: buildbot
Date: Wed Apr 17 07:18:52 2013
New Revision: 858797

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/hawtdb.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/hawtdb.html
==
--- websites/production/camel/content/hawtdb.html (original)
+++ websites/production/camel/content/hawtdb.html Wed Apr 17 07:18:52 2013
@@ -80,8 +80,11 @@
 
 pa shape=rect class=external-link href=http://hawtdb.fusesource.org/; 
rel=nofollowHawtDB/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 
title=Aggregator2Aggregator/a. /p
 
+div class=panelMacrotable class=infoMacrocolgroup span=1col 
span=1 width=24col span=1/colgrouptrtd colspan=1 rowspan=1 
valign=topimg align=middle 
src=https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif;
 width=16 height=16 alt= border=0/tdtd colspan=1 
rowspan=1bDeprecated/bbr clear=noneThe a shape=rect 
class=external-link href=http://hawtdb.fusesource.org/; 
rel=nofollowHawtDB/a  project is being deprecated and replaced by a 
shape=rect class=external-link href=https://code.google.com/p/leveldb/; 
rel=nofollowleveldb/a as the lightweight and embedable key value database. 
To make using leveldb easy there is a a shape=rect class=external-link 
href=https://github.com/fusesource/leveldbjni; rel=nofollowleveldbjni/a 
project for that. The Apache ActiveMQ project is planning on using leveldb as 
their primary file based message store in the future, to replace kahadb./t
 d/tr/table/div
+
 div class=panelMacrotable class=warningMacrocolgroup span=1col 
span=1 width=24col span=1/colgrouptrtd colspan=1 rowspan=1 
valign=topimg align=middle 
src=https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif; 
width=16 height=16 alt= border=0/tdtd colspan=1 
rowspan=1bIssue with HawtDB 1.4 or older/bbr clear=noneThere is a 
bug in HawtDB 1.4 or older which means the filestore will not free unused 
space. That means the file keeps growing. This has been fixed in HawtDB 1.5 
which is shipped with Camel 2.5 onwards./td/tr/table/div
 
+
 pCurrent features it provides:/p
 ul class=alternate type=squareliHawtDBAggregationRepository/li/ul
 
@@ -188,7 +191,7 @@
 h3a shape=rect name=HawtDB-SeeAlso/aSee Also/h3
 ullia shape=rect href=configuring-camel.html title=Configuring 
CamelConfiguring Camel/a/lilia shape=rect href=component.html 
title=ComponentComponent/a/lilia shape=rect href=endpoint.html 
title=EndpointEndpoint/a/lilia shape=rect 
href=getting-started.html title=Getting StartedGetting 
Started/a/li/ul
 
-ul class=alternate type=squarelia shape=rect 
href=aggregator2.html title=Aggregator2Aggregator/a/lilispan 
class=error[JDBC-AggregationRepository]/span/lilia shape=rect 
href=components.html title=ComponentsComponents/a/li/ul
+ul class=alternate type=squarelia shape=rect 
href=aggregator2.html title=Aggregator2Aggregator/a/lilia 
shape=rect href=components.html title=ComponentsComponents/a/li/ul
 /div
 /td
 td valign=top




svn commit: r858847 - in /websites/production/camel/content: bindy.html book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache

2013-04-17 Thread buildbot
Author: buildbot
Date: Wed Apr 17 17:21:01 2013
New Revision: 858847

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/bindy.html
websites/production/camel/content/book-dataformat-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache

Modified: websites/production/camel/content/bindy.html
==
--- websites/production/camel/content/bindy.html (original)
+++ websites/production/camel/content/bindy.html Wed Apr 17 17:21:01 2013
@@ -114,7 +114,7 @@ to/from Java Beans that have binding map
 
 div class=table-wrap
 table class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceTh Parameter name /thth colspan=1 rowspan=1 
class=confluenceTh type /thth colspan=1 rowspan=1 
class=confluenceTh Info /th/trtrtd colspan=1 rowspan=1 
class=confluenceTd separator /tdtd colspan=1 rowspan=1 
class=confluenceTd string /tdtd colspan=1 rowspan=1 
class=confluenceTd mandatory - can be ',' or ';' or 'anything'. This value 
is interpreted as a regular expression. If you want to use a sign which has a 
special meaning in regular expressions, e.g. the '|' sign, than you have to 
mask it, like ' br clear=none class=atl-forced-newline
-|' /td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
skipFirstLine /tdtd colspan=1 rowspan=1 class=confluenceTd boolean 
/tdtd colspan=1 rowspan=1 class=confluenceTd optional - default value 
= false - allow to skip the first line of the CSV file /td/trtrtd 
colspan=1 rowspan=1 class=confluenceTd crlf /tdtd colspan=1 
rowspan=1 class=confluenceTd string /tdtd colspan=1 rowspan=1 
class=confluenceTd optional - possible values = WINDOWS,UNIX,MAC; default 
value = WINDOWS - allow to define the carriage return character to use 
/td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
generateHeaderColumns /tdtd colspan=1 rowspan=1 class=confluenceTd 
boolean /tdtd colspan=1 rowspan=1 class=confluenceTd optional - 
default value = false - uses to generate the header columns of the CSV 
generates /td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
isOrdered /tdtd colspan=1 rowspan
 =1 class=confluenceTd boolean /tdtd colspan=1 rowspan=1 
class=confluenceTd optional - default value = false - allow to change the 
order of the fields when CSV is generated /td/trtrtd colspan=1 
rowspan=1 class=confluenceTd quote /tdtd colspan=1 rowspan=1 
class=confluenceTd String /tdtd colspan=1 rowspan=1 
class=confluenceTd bCamel 2.8.3/2.9:/b option - allow to specify a quote 
character of the fields when CSV is generated /td/trtrtd colspan=1 
rowspan=1 class=confluenceTd#160;/tdtd colspan=1 rowspan=1 
class=confluenceTd#160;/tdtd colspan=1 rowspan=1 
class=confluenceTd This annotation is associated to the root class of the 
model and must be declared one time. /td/tr/tbody/table
+|' /td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
skipFirstLine /tdtd colspan=1 rowspan=1 class=confluenceTd boolean 
/tdtd colspan=1 rowspan=1 class=confluenceTd optional - default value 
= false - allow to skip the first line of the CSV file /td/trtrtd 
colspan=1 rowspan=1 class=confluenceTd crlf /tdtd colspan=1 
rowspan=1 class=confluenceTd string /tdtd colspan=1 rowspan=1 
class=confluenceTd optional - possible values = WINDOWS,UNIX,MAC, or custom; 
default value = WINDOWS - allow to define the carriage return character to use. 
If you specify a value other than the three listed before, the value you enter 
(custom) will be used as the CRLF character(s) /td/trtrtd colspan=1 
rowspan=1 class=confluenceTd generateHeaderColumns /tdtd colspan=1 
rowspan=1 class=confluenceTd boolean /tdtd colspan=1 rowspan=1 
class=confluenceTd optional - default value = false - uses to generate the 
 header columns of the CSV generates /td/trtrtd colspan=1 rowspan=1 
class=confluenceTd isOrdered /tdtd colspan=1 rowspan=1 
class=confluenceTd boolean /tdtd colspan=1 rowspan=1 
class=confluenceTd optional - default value = false - allow to change the 
order of the fields when CSV is generated /td/trtrtd colspan=1 
rowspan=1 class=confluenceTd quote /tdtd colspan=1 rowspan=1 
class=confluenceTd String /tdtd colspan=1 rowspan=1 
class=confluenceTd bCamel 2.8.3/2.9:/b option - allow to specify a quote 
character of the fields when CSV is generated /td/trtrtd colspan=1 
rowspan=1 class=confluenceTd#160;/tdtd colspan=1 rowspan=1 
class=confluenceTd#160;/tdtd colspan=1 rowspan=1 
class=confluenceTd This annotation is associated to the root class of the 
model and must be declared one time. /td/tr/tbody/table
 /div
 
 
@@ -255,6 +255,17 @@ Remark : In this case, the first and las
 /pre
 /div/div
 
+pAdditionally, if for some reason you need to add a different line ending 
character, you can opt to specify it using the crlf parameter. In the following 
example, we can end the line with a comma followed by the newline character:/p
+
+div class=code panel