You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dmhatre <da...@gmail.com> on 2012/08/21 21:54:12 UTC

Is it possible for file component to NOT to move the file to .camel directory if there is error in the following endpoint of that route.

Hi Folks,

Need help with this issue.
Is it possible for file component to NOT to move the file to .camel
directory if there is error in the following endpoint of that route. Ex: if
error in processor "corpActionProcessor" can we AVOID moving the file 
from c://cameldata/corpactions to c://cameldata/corpactions/.camel

Thanks in advance,
Darpan Mhatre.

Route as below

<route id="Corporate-Actions">
          <from uri="file:c://cameldata/corpactions"/>
          <unmarshal ref="corpActionDataFormat"/>
          <process ref="corpActionProcessor"/>
          <convertBodyTo type="com.testing.eai.model.CorpActionModel"/>
          <to uri="bean:corpActionSql?method=processCorpAction"/>
</route> 



--
View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-for-file-component-to-NOT-to-move-the-file-to-camel-directory-if-there-is-error-in-th-tp5717797.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is it possible for file component to NOT to move the file to .camel directory if there is error in the following endpoint of that route.

Posted by dmhatre <da...@gmail.com>.
Thank you Christian, that was really helpful. Thanks again.



--
View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-for-file-component-to-NOT-to-move-the-file-to-camel-directory-if-there-is-error-in-th-tp5717797p5717902.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is it possible for file component to NOT to move the file to .camel directory if there is error in the following endpoint of that route.

Posted by Christian Müller <ch...@gmail.com>.
The file should not be moved into the .camel subdirectory if an exception
occurs and it's not handled. You can configure to move it into another
(sub) directory if you want.
Check out: http://camel.apache.org/file2.html -> moveFailed

Best,
Christian

On Tue, Aug 21, 2012 at 9:54 PM, dmhatre <da...@gmail.com> wrote:

> Hi Folks,
>
> Need help with this issue.
> Is it possible for file component to NOT to move the file to .camel
> directory if there is error in the following endpoint of that route. Ex: if
> error in processor "corpActionProcessor" can we AVOID moving the file
> from c://cameldata/corpactions to c://cameldata/corpactions/.camel
>
> Thanks in advance,
> Darpan Mhatre.
>
> Route as below
>
> <route id="Corporate-Actions">
>           <from uri="file:c://cameldata/corpactions"/>
>           <unmarshal ref="corpActionDataFormat"/>
>           <process ref="corpActionProcessor"/>
>           <convertBodyTo type="com.testing.eai.model.CorpActionModel"/>
>           <to uri="bean:corpActionSql?method=processCorpAction"/>
> </route>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Is-it-possible-for-file-component-to-NOT-to-move-the-file-to-camel-directory-if-there-is-error-in-th-tp5717797.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Re: Is it possible for file component to NOT to move the file to .camel directory if there is error in the following endpoint of that route.

Posted by pushkin1984 <pu...@yahoo.co.in>.
This information helps a lot. Thank you :)



--
View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-for-file-component-to-NOT-to-move-the-file-to-camel-directory-if-there-is-error-in-th-tp5717797p5766098.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is it possible for file component to NOT to move the file to .camel directory if there is error in the following endpoint of that route.

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Aug 21, 2012 at 9:54 PM, dmhatre <da...@gmail.com> wrote:
> Hi Folks,
>
> Need help with this issue.
> Is it possible for file component to NOT to move the file to .camel
> directory if there is error in the following endpoint of that route. Ex: if
> error in processor "corpActionProcessor" can we AVOID moving the file
> from c://cameldata/corpactions to c://cameldata/corpactions/.camel
>

Yes if an exception is thrown, and you do not have any error handler
configured that handle the exception, then the message would be
regarded as failed, and the file consumer, will leave the file
untouched. Notice that the file consumer will then pickup the same
file again on next poll.




> Thanks in advance,
> Darpan Mhatre.
>
> Route as below
>
> <route id="Corporate-Actions">
>           <from uri="file:c://cameldata/corpactions"/>
>           <unmarshal ref="corpActionDataFormat"/>
>           <process ref="corpActionProcessor"/>
>           <convertBodyTo type="com.testing.eai.model.CorpActionModel"/>
>           <to uri="bean:corpActionSql?method=processCorpAction"/>
> </route>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-for-file-component-to-NOT-to-move-the-file-to-camel-directory-if-there-is-error-in-th-tp5717797.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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

Re: Is it possible for file component to NOT to move the file to .camel directory if there is error in the following endpoint of that route.

Posted by contactreji <co...@gmail.com>.
Check out noop=true option as well. But if you restart the route, chances for
duplicate processing to happen. Handle that in ur code.

Cheers

Reji



-----
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-for-file-component-to-NOT-to-move-the-file-to-camel-directory-if-there-is-error-in-th-tp5717797p5766115.html
Sent from the Camel - Users mailing list archive at Nabble.com.