[
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)