[jira] [Commented] (CAMEL-10344) RouteIdFactory - That can assign route ids using derived values from uris

2016-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-10344:


Github user tkopczynski closed the pull request at:

https://github.com/apache/camel/pull/1324


> RouteIdFactory - That can assign route ids using derived values from uris
> -
>
> Key: CAMEL-10344
> URL: https://issues.apache.org/jira/browse/CAMEL-10344
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Claus Ibsen
>Priority: Minor
> Fix For: 2.19.0
>
>
> When using routes that uses direct/seda etc as route inputs, then you may 
> want to use their name as the route id, eg
> direct:foo   -> foo
> seda:bar-> bar
> jms:orders -> orders
> Instead of having route1, route2 as auto assigned names. 
> There could be a NodeIdFactory that assign such names for route's. For 
> example it can use the context-path of the route url as the name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-10344) RouteIdFactory - That can assign route ids using derived values from uris

2016-11-08 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-10344:
-

We also would need an unit test where some of the routes have explicit assigned 
id with .routeId("myRoute"), which this factory should not override.

> RouteIdFactory - That can assign route ids using derived values from uris
> -
>
> Key: CAMEL-10344
> URL: https://issues.apache.org/jira/browse/CAMEL-10344
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Claus Ibsen
>Priority: Minor
> Fix For: Future
>
>
> When using routes that uses direct/seda etc as route inputs, then you may 
> want to use their name as the route id, eg
> direct:foo   -> foo
> seda:bar-> bar
> jms:orders -> orders
> Instead of having route1, route2 as auto assigned names. 
> There could be a NodeIdFactory that assign such names for route's. For 
> example it can use the context-path of the route url as the name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-10344) RouteIdFactory - That can assign route ids using derived values from uris

2016-11-08 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-10344:
-

For the rest routes we may want to replace / with - in the name, so it 
preserves the full path and the verb.

rest foo
get 
post

then its 2 routes with id

get-foo
post-foo
Also if there is nested paths we preserve the full name

rest foo
get bar 
post bar

then its

get-foo-bar
post-foo-bar
And we would need some unit tests for rest-dsl routes.

> RouteIdFactory - That can assign route ids using derived values from uris
> -
>
> Key: CAMEL-10344
> URL: https://issues.apache.org/jira/browse/CAMEL-10344
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Claus Ibsen
>Priority: Minor
> Fix For: Future
>
>
> When using routes that uses direct/seda etc as route inputs, then you may 
> want to use their name as the route id, eg
> direct:foo   -> foo
> seda:bar-> bar
> jms:orders -> orders
> Instead of having route1, route2 as auto assigned names. 
> There could be a NodeIdFactory that assign such names for route's. For 
> example it can use the context-path of the route url as the name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-10344) RouteIdFactory - That can assign route ids using derived values from uris

2016-11-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-10344:


Github user asfgit closed the pull request at:

https://github.com/apache/camel/pull/1242


> RouteIdFactory - That can assign route ids using derived values from uris
> -
>
> Key: CAMEL-10344
> URL: https://issues.apache.org/jira/browse/CAMEL-10344
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Claus Ibsen
>Priority: Minor
> Fix For: Future
>
>
> When using routes that uses direct/seda etc as route inputs, then you may 
> want to use their name as the route id, eg
> direct:foo   -> foo
> seda:bar-> bar
> jms:orders -> orders
> Instead of having route1, route2 as auto assigned names. 
> There could be a NodeIdFactory that assign such names for route's. For 
> example it can use the context-path of the route url as the name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-10344) RouteIdFactory - That can assign route ids using derived values from uris

2016-11-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-10344:


GitHub user tkopczynski opened a pull request:

https://github.com/apache/camel/pull/1242

CAMEL-10344: RouteIdFactory - assigning route ids based on uris

This PR adds RouteIdFactory which can be used as a NodeIdFactory 
implementation in CamelContext as a different strategy for assigning route ids.

Currently, it works with direct and similar routes.

Unfortunately, I'm not sure on how to integrate this with assigning ids in 
rest routes. It feels like this should be somewhere in 
`RestDefinition.addRouteDefinition` but route id is assigned so early that 
RouteDefinition doesn't have enough information for creating the id from the 
path.

@davsclaus do you have any ideas/suggestions on this?

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/tkopczynski/camel camel-10344

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/1242.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1242


commit f0bc524b7546b398a4a4f804c63a7e0807d1b58a
Author: Tomasz Kopczynski 
Date:   2016-11-01T18:49:06Z

CAMEL-10344: RouteIdFactory - assigning route ids based on uris




> RouteIdFactory - That can assign route ids using derived values from uris
> -
>
> Key: CAMEL-10344
> URL: https://issues.apache.org/jira/browse/CAMEL-10344
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Claus Ibsen
>Priority: Minor
> Fix For: Future
>
>
> When using routes that uses direct/seda etc as route inputs, then you may 
> want to use their name as the route id, eg
> direct:foo   -> foo
> seda:bar-> bar
> jms:orders -> orders
> Instead of having route1, route2 as auto assigned names. 
> There could be a NodeIdFactory that assign such names for route's. For 
> example it can use the context-path of the route url as the name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)