camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Camel > Camel 2.3 - Overhaul of Aggregator EIP
Date Thu, 18 Feb 2010 11:40:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="">Camel
2.3 - Overhaul of Aggregator EIP</a></h2>
     <h4>Page <b>edited</b> by             <a href="">Claus
     <div class="notificationGreySide">
         <h2><a name="Camel2.3-OverhaulofAggregatorEIP-Camel2.3OverhaulofAggregatorEIP"></a>Camel
2.3 - Overhaul of Aggregator EIP</h2>

<p>The <a href="/confluence/display/CAMEL/Aggregator" title="Aggregator">Aggregator</a>
EIP needs an overhaul in Camel to remedy a few new features, improvements and fix an issue
with using completion predicate and timeout.</p>

<h3><a name="Camel2.3-OverhaulofAggregatorEIP-Currentissues"></a>Current
<ul class="alternate" type="square">
	<li>Build on top of BatchProcessor which has to complex logic for concurrent locking
and accepting new messages.</li>
	<li>BatchProcessor was originally designed to help with batch and transactions</li>
	<li>Either BatchProcessor needs to be reworked or a new base class implemented</li>
	<li>Completion predicate and batch timeout does not work together</li>
	<li>Batch timeout is actually a interval check timeout</li>
	<li>AggregationStrategy is invoked to <em>late</em> as its only invoked
when the batch timeout triggers</li>
	<li>BatchSender is single threaded</li>

<h3><a name="Camel2.3-OverhaulofAggregatorEIP-NewDesign"></a>New Design</h3>
<ul class="alternate" type="square">
	<li>BatchSender should use ExecutorsService that ensures if a thread is dead a new
thread will be started, eg the task is always running. <b>DONE</b></li>
	<li>BatchSender is currently only a single thread. We should support concurrency, so
you can have multiple output based on per correlation key. <b>DONE</b></li>
	<li>BatchSender should have simpler logic for enqueing and locking if possible. <b>DONE</b></li>
	<li>BatchProcessor should support persistent, so aggregated exchanges can be stored
in a database using <a href="/confluence/display/CAMEL/JPA" title="JPA">JPA</a>.
See how we do this with the <a href="/confluence/display/CAMEL/Idempotent+Consumer" title="Idempotent
Consumer">Idempotent Consumer</a> and/or <a href="/confluence/display/CAMEL/Tracer"
title="Tracer">Tracer</a>. <b>DONE</b></li>
	<li>If possible: AggregationStrategy should be invoked on the fly so you in the future
can use it to determine if we are complete. <b>DONE</b></li>
	<li>Batch timeout and completion predicate should work together so the completion is
triggered by the first one. <b>DONE</b></li>
	<li>Batch timeout should be per correlation key based, and not a single global timeout.
	<li>Add POJO based aggregation strategy so you can avoid using the low level Exchange
	<li>Add option what to do in case the correlation key cannot be evaluated, eg to ignore
or throw an exception back to caller. <b>DONE</b></li>
	<li>Add option to ignore to <em>late</em> exchanges if a correlation key
has been <em>closed</em>. <b>DONE</b></li>
	<li>Look all JIRA tickets at Apache what we have for the <a href="/confluence/display/CAMEL/Aggregator"
title="Aggregator">Aggregator</a> <b>DONE</b></li>
	<li><a href="/confluence/display/CAMEL/Resequencer" title="Resequencer">Resequencer</a>
is also using the <tt>BatchProcessor</tt> so we should ensure it works as well
and maybe it can benefit some of the new features as well.</li>
	<li>BatchSender should support transactions, which you can do with <tt>.transacted()</tt>.
But we should have unit test based on that if absent.</li>
	<li>Add <a href="/confluence/display/CAMEL/JPA" title="JPA">JPA</a> persistent
AggregationRepository out of the box</li>
	<li>Consider if possible a <a href="/confluence/display/CAMEL/JMS" title="JMS">JMS</a>
persistent AggregationRepository out of the box</li>
	<li>Configuration of completion options should be more dynamic such as timeout and
size <b>DONE</b></li>

     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>

       <a href="">View
       <a href="">View
       <a href=";showCommentArea=true#addcomment">Add

View raw message