camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10596) RoutePolicy - To easily stop routes after X messages or time
Date Thu, 02 Mar 2017 14:23:45 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-10596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892317#comment-15892317
] 

Claus Ibsen commented on CAMEL-10596:
-------------------------------------

For spring boot apps you can make it auto terminate
{code}
# the name of Camel
camel.springboot.name = SampleCamel

camel.springboot.main-run-controller=true
camel.springboot.main-run-controller-max-duration-messages=6

{code}

However this is when NOT using spring-boot-starter-web (eg tomcat, undertow) as it then uses
Camel to keep the JVM running which it can stop nicely.

> RoutePolicy - To easily stop routes after X messages or time
> ------------------------------------------------------------
>
>                 Key: CAMEL-10596
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10596
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.19.0
>
>
> Sometimes people want to run a Camel route for 1 message, or until there are no more
new messages, or stop after X seconds etc.
> We should provide some basic route policy / factory that people can use, and easily configure.
And we can then add the logic to safely stop the routes while running, which can be a little
tricky
> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message