camel-users mailing list archives

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

A good approach could be to design your applications to detect
duplicate messages.
See the idempotent consumer.
http://camel.apache.org/idempotent-consumer.html


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 <ben.oday@initekconsulting.com> 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 -http://benoday.blogspot.com
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Error-recovery-tp4370197p4370930.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message