You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fxthomas <fe...@gmail.com> on 2016/08/04 16:30:18 UTC

Camel Suspend moving file to error folder.

Hello, 

I want to know if there is a way to handle this below scenario in which the
file which is being processed get moved to the error folder when the camel
route is suspended. So when i resume the route the file is not there to be
processed . I thought suspend means kinda a wait\sleep process thread. I
tried with the 
<handled><constant>true</constant></handled> & false flag but the outcome
was same, the file got moved to the error folder. I want to resume the
processing the file from the same state in which the route was suspended.
(if its possible)

the processor called is <process ref="stopRouteALLProcessor"/> which
suspends all routes.

 <route routePolicyRef="routeFilePolicy"
shutdownRunningTask="CompleteCurrentTaskOnly" id="ProcessCsv"
autoStartup="false">
    <from
uri="file:///C:\FS\processing\?readLock=changed&amp;readLockTimeout=10000&amp;include=.*csv&amp;moveFailed=C:\FS\error\&amp;sortBy=file:modified&amp;move=C:\FS\complete\&amp;charset=utf-8&amp;sorter=#customFileSorter&amp;delay=5000&amp;useFixedDelay=true"/>
        <onException>
       		<exception>com.XXX.exception.ErrorThresHoldException</exception>
        	<handled><constant>false</constant></handled>
        </onException>
        <onException>
            <exception>java.sql.SQLRecoverableException</exception>
            <exception>java.net.ConnectException</exception>
           
<exception>org.springframework.jdbc.CannotGetJdbcConnectionException</exception>
            <handled><constant>true</constant></handled>
            <process ref="stopRouteALLProcessor"/>
        </onException>             
        <onException>
       		<exception>java.lang.Exception</exception>
        	<handled><constant>false</constant></handled>
        	<process ref="stopRouteProcessor"/>
        </onException>
        <choice>
     	   	<when>
            	<simple>${body} != null</simple>
                <to
uri="bean:routeFileBean?method=processFileMessage(${body},'databasebean')"/>
        	</when> 
        </choice>
  </route>



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Suspend-moving-file-to-error-folder-tp5786039.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Suspend moving file to error folder.

Posted by fxthomas <fe...@gmail.com>.
Hello, 

I want the file to remain where it is even if the camel route is suspended. 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Suspend-moving-file-to-error-folder-tp5786039p5786152.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Suspend moving file to error folder.

Posted by souciance <so...@gmail.com>.
I am not sure if it works when the route gets suspended, but I assume you
want to move it when an error occurs and then suspend the route, or?



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Suspend-moving-file-to-error-folder-tp5786039p5786145.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Suspend moving file to error folder.

Posted by fxthomas <fe...@gmail.com>.
any tips or hints guys ?



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Suspend-moving-file-to-error-folder-tp5786039p5786134.html
Sent from the Camel - Users mailing list archive at Nabble.com.