You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Björn Bength <bj...@gmail.com> on 2010/09/24 12:00:53 UTC

Route Id

Hi List,

We use JMX to monitor our camel routes. That works great, but we need to
add a routeId("") to every route manually to get rid of the standard
"route46" id.

by default we just use the endpointuri of the route, because most of the time
we create our routes with a consumer starting with from(uri)...

so everywhere we add, for example:
from("cxf:bean:statusService").routeId("cxf:bean:statusService")...

Is there a way to set a "RouteNameStrategy"?
Or couldn't you chage camel to default to use the endpointUri for
routeId in jmx, traceing and logging,
if another routeId is not specified.

regards
Bjorn

Re: Route Id

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

There is a JIRA ticket to add a pluggable API in the future for a
naming strategy.

Since its java code in Java DSL you can do

String uri = "cxf:xxx");

from(uri).routeId(uri).yyyy



2010/9/24 Björn Bength <bj...@gmail.com>:
> Hi List,
>
> We use JMX to monitor our camel routes. That works great, but we need to
> add a routeId("") to every route manually to get rid of the standard
> "route46" id.
>
> by default we just use the endpointuri of the route, because most of the time
> we create our routes with a consumer starting with from(uri)...
>
> so everywhere we add, for example:
> from("cxf:bean:statusService").routeId("cxf:bean:statusService")...
>
> Is there a way to set a "RouteNameStrategy"?
> Or couldn't you chage camel to default to use the endpointUri for
> routeId in jmx, traceing and logging,
> if another routeId is not specified.
>
> regards
> Bjorn
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus