You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by a746076drdrb <a7...@drdrb.net> on 2014/04/03 13:10:16 UTC

How to disable initial file rollback strategy

Hello,

I have route like:

from(file:input?preMove=inprogress&moveFailed=failed)
.process(new SomeProcessor())
.("file:input/processed", "file:route2", "file:route3").to("seda:remote")

from("file:route2").to("ftp:foo)
from("file:route3").to("ftp:bar)
from("seda:remote").to("http:getfile").to("myendpoint:save")

now in seda:remote route after to("http:getfile") I get an error saying

org.apache.camel.processor.MulticastProcessor: Message exchange has failed:
Sequential pro
cessing failed for number 0 for exchange: Exchange[Message: [Body is null]]
Exception: java.io.IOException: No such file or directory
org.apache.camel.processor.MulticastProcessor: Done sequential processing 1
exchange

Apparently, seda thread tries to delete the file from first route
'input/inprogress' folder, which is probably moved by an other route. 

How can I disable initial file rollback strategy in my from("seda:remote")
route? I just want it to work in my first route.

Thanks for help!



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-disable-initial-file-rollback-strategy-tp5749721.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to disable initial file rollback strategy

Posted by a746076drdrb <a7...@drdrb.net>.
Thanks for suggestions!

Setting option waitForTaskToComplete=Never on both to(seda) from(seda)
didn't change anything. Seda thread still trying to delete the input file.

I've also tried wireTap("seda:remote?waitForTaskToComplete=Never") but id
didn't work at all. Seda did not receive any exchange. I've added logging
and can only see "sent message to SEDA", but not "SEDA received a message
${body}"

What is required to make wireTap working?

from(file:input?preMove=inprogress&moveFailed=failed) 
.process(new SomeProcessor()) 
.("file:input/processed", "file:route2", "file:route3")
.log("sending message to SEDA")
.wireTap("seda:remote?waitForTaskToComplete=Never")
.log("sent message to SEDA")

from("file:route2").to("ftp:foo) 
from("file:route3").to("ftp:bar) 

from("seda:remote?waitForTaskToComplete=Never")
.log("SEDA received a message ${body}")
.to("http:getfile")
.to("myendpoint:save") 



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-disable-initial-file-rollback-strategy-tp5749721p5749789.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to disable initial file rollback strategy

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can use wireTap("seda:remote") or likely also
.to("seda:remote?waitForTaskToComplete=Never")

On Thu, Apr 3, 2014 at 1:10 PM, a746076drdrb <a7...@drdrb.net> wrote:
> Hello,
>
> I have route like:
>
> from(file:input?preMove=inprogress&moveFailed=failed)
> .process(new SomeProcessor())
> .("file:input/processed", "file:route2", "file:route3").to("seda:remote")
>
> from("file:route2").to("ftp:foo)
> from("file:route3").to("ftp:bar)
> from("seda:remote").to("http:getfile").to("myendpoint:save")
>
> now in seda:remote route after to("http:getfile") I get an error saying
>
> org.apache.camel.processor.MulticastProcessor: Message exchange has failed:
> Sequential pro
> cessing failed for number 0 for exchange: Exchange[Message: [Body is null]]
> Exception: java.io.IOException: No such file or directory
> org.apache.camel.processor.MulticastProcessor: Done sequential processing 1
> exchange
>
> Apparently, seda thread tries to delete the file from first route
> 'input/inprogress' folder, which is probably moved by an other route.
>
> How can I disable initial file rollback strategy in my from("seda:remote")
> route? I just want it to work in my first route.
>
> Thanks for help!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-disable-initial-file-rollback-strategy-tp5749721.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io