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: Help: FTP/SFTP File Delete Problem and FTP/SFTP Polling Problem
Date Mon, 12 Jan 2015 08:56:33 GMT
Hi

You can use a route policy, and then stop the consumer in onExchangeDone
http://camel.apache.org/routepolicy.html

On Mon, Jan 12, 2015 at 8:31 AM, yeandone <willcoursera@gmail.com> wrote:
> Will there be any risks if I stop route like that? After the exchange is
> processed by both end endpoints direct a and direct b. I need to stop the
> route so that the consumer can stop polling. Can you please give some ideas
> to stop route/consumer properly so that the route and consumer will stop
> properly without any risks?
>
> On Sun, Jan 11, 2015 at 9:36 PM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5761572h86@n5.nabble.com> wrote:
>
>> On Sun, Jan 11, 2015 at 3:48 AM, yeandone <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=5761572&i=0>> wrote:
>>
>> > Thanks, Claus. Will try a new version. But do you know why it always
>> > prompts the following warnings when the routes stops? Will they impact
>> > anything and the original file?
>> >
>> > 1. If choose not to delete the file, it prompts when the route stops:
>> >
>> > WARN Camel (platformSchedulerCamel) thread #7 - sftp://xxx
>> > org.apache.camel.component.file.GenericFileOnCompletion - Rollback file
>> > strategy:
>> >
>> org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@4b474b47
>> > for file: RemoteFile[a.txt]
>> >
>>
>> Its because you stop the route from the route, eg then the current
>> exchange is forced to be stopped and thus wants to rollback.
>>
>>
>>
>> > 2. If choose not to delete the file, it prompts when the route stops:
>> > WARN Camel (platformSchedulerCamel) thread #7 - sftp://xxx
>> > org.apache.camel.component.file.GenericFileOnCompletion - Rollback file
>> > strategy:
>> >
>> org.apache.camel.component.file.strategy.GenericFileNoOpProcessStrategy@4b474b47
>> > for file: RemoteFile[a.txt]
>> >
>> >
>> >
>> > On Fri, Jan 9, 2015 at 11:24 PM, Claus Ibsen-2 [via Camel] <
>> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=5761572&i=1>>
>> wrote:
>> >
>> >> Try with newer release, there may have been a bug fix
>> >>
>> >> On Fri, Jan 9, 2015 at 6:47 PM, yeandone <[hidden email]
>> >> <http:///user/SendEmail.jtp?type=node&node=5761545&i=0>>
wrote:
>> >>
>> >> > HI, Claus.
>> >> >
>> >> >   Thanks for the prompt reply! I am using Camel 2.12. I also tried
>> >> adding
>> >> > aync=true in controlbus
>> >> > <to
>> uri="controlbus:route?routeId=A_Route&amp;aync=true&amp;action=stop"
>> >> />
>> >> >
>> >> >   It does help delete the file, but it has some issues with polling.
>> >> Until
>> >> > the file get deleted and control bus stops, the route still keeps
>> >> polling
>> >> > for a while. 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 and polling
>> >> > immediately.  Any ideas to resolve the issue?
>> >> >
>> >> >  Thanks
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > View this message in context:
>> >>
>> http://camel.465427.n5.nabble.com/Help-FTP-SFTP-File-Delete-Problem-and-FTP-SFTP-Polling-Problem-tp5761486p5761535.html
>> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> -----------------
>> >> Red Hat, Inc.
>> >> Email: [hidden email]
>> >> <http:///user/SendEmail.jtp?type=node&node=5761545&i=1>
>> >> Twitter: davsclaus
>> >> Blog: http://davsclaus.com
>> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >> hawtio: http://hawt.io/
>> >> fabric8: http://fabric8.io/
>> >>
>> >>
>> >> ------------------------------
>> >>  If you reply to this email, your message will be added to the
>> discussion
>> >> below:
>> >>
>> >>
>> http://camel.465427.n5.nabble.com/Help-FTP-SFTP-File-Delete-Problem-and-FTP-SFTP-Polling-Problem-tp5761486p5761545.html
>> >>  To unsubscribe from Help: FTP/SFTP File Delete Problem and FTP/SFTP
>> >> Polling Problem, click here
>> >> <
>> >> .
>> >> NAML
>> >> <
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>> >>
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Help-FTP-SFTP-File-Delete-Problem-and-FTP-SFTP-Polling-Problem-tp5761486p5761561.html
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=5761572&i=2>
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> hawtio: http://hawt.io/
>> fabric8: http://fabric8.io/
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/Help-FTP-SFTP-File-Delete-Problem-and-FTP-SFTP-Polling-Problem-tp5761486p5761572.html
>>  To unsubscribe from Help: FTP/SFTP File Delete Problem and FTP/SFTP
>> Polling Problem, click here
>> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5761486&code=d2lsbGNvdXJzZXJhQGdtYWlsLmNvbXw1NzYxNDg2fDc4ODg5MzE5OQ==>
>> .
>> NAML
>> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Help-FTP-SFTP-File-Delete-Problem-and-FTP-SFTP-Polling-Problem-tp5761486p5761577.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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message