You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Henric Hedin (JIRA)" <ji...@apache.org> on 2009/04/21 21:59:31 UTC
[jira] Created: (CAMEL-1556) Controlling initiatation order of
routes
Controlling initiatation order of routes
----------------------------------------
Key: CAMEL-1556
URL: https://issues.apache.org/activemq/browse/CAMEL-1556
Project: Apache Camel
Issue Type: Wish
Components: camel-core
Reporter: Henric Hedin
Priority: Minor
Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
// initiated from queue
from("jms:queue:SOURCE_QUEUE").
to("direct:processMsg");
// initiated from file
from("file://inbox).
to("direct:processMsg");
// Main flow
from("direct:processMsg")
.process("...")
.to("validator:foo.xsd")
.to("jms:queue:DEST_QUEUE");
... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CAMEL-1556) Controlling initiatation
order of routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54605#action_54605 ]
Claus Ibsen edited comment on CAMEL-1556 at 10/4/09 1:49 AM:
-------------------------------------------------------------
TODO: Document wiki page *DONE*
Wiki page updated
was (Author: davsclaus):
TODO: Document wiki page
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54602#action_54602 ]
Claus Ibsen commented on CAMEL-1556:
------------------------------------
trunk: 821383.
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-1556:
-------------------------------
Priority: Major (was: Minor)
Fix Version/s: 2.1.0
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Henric Hedin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henric Hedin updated CAMEL-1556:
--------------------------------
Issue Type: New Feature (was: Wish)
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Priority: Minor
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-1556:
----------------------------------
Assignee: Claus Ibsen
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-1556.
--------------------------------
Resolution: Fixed
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54603#action_54603 ]
Claus Ibsen commented on CAMEL-1556:
------------------------------------
You can now set a number which indicate the startupOrder. The lowest is started first.
{code}
from("direct:foo").starupOrder(1).to("seda:foo");
from("seda:foo").startupOrder(2).to("mock:foo");
{code}
And for XML you define it as an attribute
{code}
<route startupOrder="1">
...
</route>
{code}
The *startupOrder* should be unique in all routes within the camel context.
By default if a route does not have a startupOrder assigned it will be auto assigned a number starting from 1000.
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54610#action_54610 ]
Claus Ibsen commented on CAMEL-1556:
------------------------------------
trunk: 821478.
Now Camel throws an {{FailedToStartRouteException}} in case there is a starupOrder clash.
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54605#action_54605 ]
Claus Ibsen commented on CAMEL-1556:
------------------------------------
TODO: Document wiki page
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54604#action_54604 ]
Claus Ibsen commented on CAMEL-1556:
------------------------------------
Consider what to do if two routes have defined the same ID currently a WARN is logged. Maybe Camel should thrown an exception and fail to startup. This ensures that end users is aware of this issue and can fix it, instead of the WARN log.
If not should non unique numbers be allowed? It could also be a mistake if there are two routes with startupOrder = 4
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1556) Controlling initiatation order of
routes
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54606#action_54606 ]
Claus Ibsen commented on CAMEL-1556:
------------------------------------
BTW We also improved in Camel 2.1 to start the inputs to the routes at the very end. So the initial problem will without this patch be hard to reproduce as Camel starts all the inputs very fast at the same time.
> Controlling initiatation order of routes
> ----------------------------------------
>
> Key: CAMEL-1556
> URL: https://issues.apache.org/activemq/browse/CAMEL-1556
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Henric Hedin
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> Would be nice if it was possible to control the order of how routes are initiated. If the following code is implemented within the same RouteBuilder.configure:
> // initiated from queue
> from("jms:queue:SOURCE_QUEUE").
> to("direct:processMsg");
> // initiated from file
> from("file://inbox).
> to("direct:processMsg");
> // Main flow
> from("direct:processMsg")
> .process("...")
> .to("validator:foo.xsd")
> .to("jms:queue:DEST_QUEUE");
> ... and there already is a message waiting on the JMS-source when camel is started, it could/will lead to the following error:
> WARN DirectProducer - No consumers available on endpoint: Endpoint[direct:processMsg] to process Exchange[JmsMessage:
> Today the are workarounds (by splitting in multiple files, and re-order route definitions), but maybe this could solved in some other better way (which also could affect a graceful shutdown).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.