camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Error recovery
Date Thu, 05 May 2011 06:13:33 GMT

A good approach could be to design your applications to detect
duplicate messages.
See the idempotent consumer.

That is much easier than trying to have a high QoS of delivering a
message exactly once.
That is frankly very hard as you need tight bookkeeping to keep state
of delivery and ack of messages.

You can detect the duplicates in the Camel application or on the
receiver side of the message broker.
Or in both for the matter.

An alternative is to split the file into 1 message per file. And then
consume those files.
That is possible since a file is persistent. And Camel only
delete/moves the file if it could successfully process it.

big file -> N files -> JMS

On Wed, May 4, 2011 at 10:05 PM, boday <> wrote:
> It won't resume where it left off by default.  Camel will only delete the
> file if it was successfully processed and when it fails, the portion already
> send to AMQ will not be rolled back.  When the process resumes, it will
> process the entire file again.  One option is to use the file's moveFailed
> option to move the file if it failed for special processing (if already
> queued, ignore, etc)...
> shailesh wrote:
>> Hi,
>>    I have camel in the web container. And I am processing the xml file and
>> spliting it and posting the split message to JMS queue.
>>    The question I have that if the server was the crash in the middle of
>> the processing of the file.
>>    I would like the recovery from the failure to begin the processing from
>> where the file was left off.
>>   <route>
>>  <from uri="file://c:/target/infile"/>
>>      <split>
>>             <xpath>/foo/bar</xpath>
>>             <to uri="jms:testQ1"/>
>>        </split>
>>   </route>
>>    Thanks for suggestion.
> -----
> Ben O'Day
> IT Consultant -
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
CamelOne 2011:
Twitter: davsclaus
Author of Camel in Action:

View raw message