camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ankelee <andreasasm...@gmail.com>
Subject Re: Route does not shut down if there is no message on poll.
Date Mon, 14 Jun 2010 15:58:10 GMT

Hi Claus

I'm not really sure how/if this ticket relates to the issue I have.
Can you elaborate?

I'd see more use in Willems suggestion.

Either feature could be used for my use case:
* Stop route if poll had no messages.

or

*Have cron-statements directly on the file/ftp/whatever endpoints.

I don't know which is easiest in scope - but maybe there should be created a
ticket for both?




Claus Ibsen-2 wrote:
> 
> Hi
> 
> Ticket is
> https://issues.apache.org/activemq/browse/CAMEL-2800
> 
> On Tue, Jun 8, 2010 at 3:44 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>> Hi
>>
>> You handle the lifecycles of your own routes then.
>> So I bet in RouteController you can shutdown the routes manually.
>>
>> But I also think we should offer an option on Camel to let it shutdown
>> any routes which has been manually started/added later.
>> I will create a JIRA for that.
>>
>>
>> On Tue, Jun 8, 2010 at 10:53 AM, ankelee <andreasasmuss@gmail.com> wrote:
>>>
>>> Hi
>>>
>>> I have a setup where I start a route with with a quartz timer. This
>>> route
>>> then starts another route that does the actual work of fetching files
>>> from
>>> an ftp and then shuts down.
>>>
>>> The problem with this workaround is that the ftp-fetching route will
>>> never
>>> shut down if there are no messages on the ftp since it is a message
>>> reaching
>>> the end of the route that activates the shut down.
>>>
>>> Any ideas how to fix this? :)
>>>
>>> <!-- Scheduled start-FTP trigger route -->
>>> <route id="StartFtpTriggerRoute" autoStartup="true">
>>>        <from uri="quartz://scheduledpoll?cron={{cron.poll}}" />
>>>        <setHeader headerName="routeToStart">
>>>                <constant>FtpPollingRoute</constant>
>>>        </setHeader>
>>>        <bean ref="RouteController" method="start" />
>>>        <stop />
>>> </route>
>>>
>>> <!-- Route-stopping route -->
>>> <route>
>>>        <from uri="seda:StopRouteRoute" />
>>>        <bean ref="RouteController" method="stop" />
>>> </route>
>>>
>>> <!-- FTP polling route -->
>>> <route id="FtpPollingRoute" errorHandlerRef="deadLetterErrorHandler"
>>> autoStartup="false">
>>>        <from
>>> uri="ftp:{{ftp.server}}{{ftp.inbox}}?username={{ftp.user}}&amp;password={{ftp.password}}&amp;delete=true&amp;disconnect=true"
>>> />
>>>        <onCompletion>
>>>                <filter>
>>>                        <simple>${property.CamelBatchComplete}
==
>>> true</simple>
>>>                        <setHeader headerName="routeToStop">
>>>                                <constant>FtpPollingRoute</constant>
>>>                        </setHeader>
>>>                        <to uri="seda:StopRouteRoute" />
>>>                </filter>
>>>        </onCompletion>
>>>        <to uri="file:data" />
>>> </route>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Route-does-not-shut-down-if-there-is-no-message-on-poll.-tp28815309p28815309.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/Route-does-not-shut-down-if-there-is-no-message-on-poll.-tp28815309p28881412.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message