Hi

What version of Camel do you use?

Also you can try set async=true on the controlbus

On Fri, Jan 9, 2015 at 8:05 AM, yeandone <willcours...@gmail.com> wrote:
> Hi, All.
>
>   I have an issue deleting a file with delete=true from a SFTP consumer.  My
> route looks like the following:
> <route id="A_ROUTE">
>                 <from
> uri="sftp:am...@xxx.com?password=xxx&amp;delete=true&amp;filter=#fileFilter"/>
>                         <choice>
>                                 <when>
>                                         <simple>${body} != null</simple>
>                                         <multicast>
>                                         <to uri="direct:a"/>
>                                         <to uri="direct:b"/>
>                                     </multicast>
>                            </when>
>                                 <otherwise>
>                                         <to uri="direct:b"/>
>                                 </otherwise>
>                         </choice>
>                         <to 
> uri="controlbus:route?routeId=A_Route&amp;action=stop" />
> </route>
>
> whenever it runs, it will end up
> WARN Camel (platformSchedulerCamel) thread #7 - sftp://xxx
> org.apache.camel.component.file.GenericFileOnCompletion - Rollback file
> strategy:
> org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy@4b474b47
> for file: RemoteFile[a.txt]
>
> Does anyone have any idea why it happens? What I want to do is deleting
> original file after it's processed by direct: a and direct: b and then stop
> the route which will stop the file polling from the sftp location. If
> nothing is picked, then I want to do some processing in direct:b and then
> stop the route.
>
> If I remove
> <to uri="controlbus:route?routeId=A_Route&amp;action=stop" /> at the end,
> the file will be deleted. However, the sftp consumer will never stop and
> keep polling stfp, which I do not want to happen.
>
> Any help or any ideas will be appreciated!!!
>
> Thanks,
> W
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Help-FTP-SFTP-File-Delete-Problem-and-FTP-SFTP-Polling-Problem-tp5761486.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to