[
https://issues.apache.org/activemq/browse/CAMEL-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54233#action_54233
]
Scott Clasen commented on CAMEL-1473:
-------------------------------------
Yes, I do.
I have a camel context that I want to, on startup, process all messages from a
given endpoint, before processing messages from the "main" endpoint. Something
like this...
<camel:camelContext:>
<camel:route>
<camel:from uri="direct:placeholder"/>
<!-- should be <camel:from uri="jms:queue:mainQueue"
autoStartup="false"/> -->
<camel:to uri="bean:workBean"/>
</camel:route>
<camel:route>
<camel:from uri="jms:queue:onStartupQueue"/>
<camel:to uri="bean:workBean"/>
</camel:route>
</camel:camelContext>
Without the ability to declare the routes which should start when the context
starts, I have to declare a placeholder endpoint (direct:placeholder) that
will never recvieve any messages. Once I am done with the "startupQueue", I
shut the startupQueue route down, replace the placeholder uri with the "real
uri" (jms:queue:mainQueue) and restart the main route.
If I want to stop and then later restart the context, I have to do the same
kind of gymnastics, but in reverse, resetting the placeholder route on camel
context shutdown, so that when the context is restarted , i dont process
messages from the main queue.
> Allow routes to be configured to be stopped by default ie autoStartup="false"
> in DSL and XML routes --- logical extension of CAMEL-1004 functionality
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-1473
> URL: https://issues.apache.org/activemq/browse/CAMEL-1473
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Affects Versions: 2.0-M1
> Reporter: Scott Clasen
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Since routes are now stoppable and startable, there should be a configuration
> option for routes in DSL and XML that lest you have routes stopped by
> default, which can later be started via the camelContext.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.