camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Bauhan <s...@ast.dfs.de>
Subject Re: Aggregator and closeCorrelationKeyOnCompletion
Date Mon, 22 Apr 2013 07:34:20 GMT
Thanks, this works fine.
Then I only have to propagate the errors to the aggregator and let them 
throw an exception there.

On 04/18/13 15:28, Claus Ibsen wrote:
> The key is only being added as closed when the aggreaged exchange has
> been completed. So if the strategy throws an exception then its not
> completed yet.
>
> On Thu, Apr 18, 2013 at 12:25 PM, Sven Bauhan <sven.bauhan@ast.dfs.de> wrote:
>> Hi,
>>
>> I use an aggregator to combine segmented messages (as the channel has
>> limited size).
>> For each received segment a response message is expected with the
>> appropriate response status.
>> As correlation key the message ID is used; and each segment has a segment
>> number.
>>
>> When a complete message is received, the correlation key shall be closed to
>> prevent receiving different messages with the same message ID.
>>
>> But what happens, if the message will not get completed, because a segment
>> is incorrect? How can a correlation key be held open when the message is
>> resend?
>>
>> I am not clear, how to implement the aggregate() method in the
>> AggragationStrategy. How to react when a wrong segment is received? Does the
>> Aggregator reset the correlation key and segment counter automatically, if
>> the aggregate() method throws an exception? Or is there another way to tell
>> the Aggregator what to do?
>>
>> Thanks,
>> Sven
>>
>
>


Mime
View raw message