You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dermoritz <ta...@hotmail.com> on 2014/07/24 14:00:54 UTC

naming routes with setId doesn't work on a specific machine

We encountered a very strange behavior. In our camel app we set the id of all
routes via "setId(id)". This is working fine so far.
One of our route builders generates n routes in a for loop and uses
<Prefix>+<EndUri> as route id. Here set Route is called on a
ThrottleDefinition.

This is working fin on mot of our machines (all developer machines, test,
and pre-life) but on production those n routes get names like
route-1...route-n (default camel names). I don't have any clue why this
difference. Can someone please give a hint where to look? Or how to fix it?




--
View this message in context: http://camel.465427.n5.nabble.com/naming-routes-with-setId-doesn-t-work-on-a-specific-machine-tp5754365.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: naming routes with setId doesn't work on a specific machine

Posted by dermoritz <ta...@hotmail.com>.
ok i found the solution:
the problem was - the config on production was slightly diferent - without
throttle.

Calling setId on a ThrottleDefinition simply doesn't work (or at least does
not set the route id). So i changed the code to set the id before doing
"routeDef = routeDef.throttle" 

(How to call a throttle with fluent api was subject on a other thread here)



--
View this message in context: http://camel.465427.n5.nabble.com/naming-routes-with-setId-doesn-t-work-on-a-specific-machine-tp5754365p5754405.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: naming routes with setId doesn't work on a specific machine

Posted by Matt Sicker <bo...@gmail.com>.
In the from...to... you would do:

from(foo).routeId("CustomId").to(...)


On 24 July 2014 07:49, dermoritz <ta...@hotmail.com> wrote:

> on which class i can found "setRouteId"? It seems not part of
> RouteDefinition
> (
> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/model/RouteDefinition.html
> )
> - i can't put it within route definition (from...to....)?!
>
> but why to use another method here, until now this is working fine and doc
> says use setId:
> http://camel.apache.org/how-do-i-name-my-routes.html
>
> please help to understand
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/naming-routes-with-setId-doesn-t-work-on-a-specific-machine-tp5754365p5754383.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Matt Sicker <bo...@gmail.com>

Re: naming routes with setId doesn't work on a specific machine

Posted by dermoritz <ta...@hotmail.com>.
on which class i can found "setRouteId"? It seems not part of RouteDefinition
(http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/model/RouteDefinition.html)
- i can't put it within route definition (from...to....)?!

but why to use another method here, until now this is working fine and doc
says use setId:
http://camel.apache.org/how-do-i-name-my-routes.html

please help to understand



--
View this message in context: http://camel.465427.n5.nabble.com/naming-routes-with-setId-doesn-t-work-on-a-specific-machine-tp5754365p5754383.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: naming routes with setId doesn't work on a specific machine

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Use .setRouteId to set the route id

On Thu, Jul 24, 2014 at 2:00 PM, dermoritz <ta...@hotmail.com> wrote:
> We encountered a very strange behavior. In our camel app we set the id of all
> routes via "setId(id)". This is working fine so far.
> One of our route builders generates n routes in a for loop and uses
> <Prefix>+<EndUri> as route id. Here set Route is called on a
> ThrottleDefinition.
>
> This is working fin on mot of our machines (all developer machines, test,
> and pre-life) but on production those n routes get names like
> route-1...route-n (default camel names). I don't have any clue why this
> difference. Can someone please give a hint where to look? Or how to fix it?
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/naming-routes-with-setId-doesn-t-work-on-a-specific-machine-tp5754365.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/