camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Using route as template to create dynamic routes
Date Thu, 23 Sep 2010 04:10:01 GMT
On 9/23/10 3:31 AM, tide08 wrote:
> Hi,
> Here is what I need, I suspect it is possible with camel but cannot figure
> out how to achieve it. If anyone can give me some leads on how to achieve
> this.
> I have multiple routes, one of which is as below.
>   <camel:route>
>      <camel:from uri="queue:somequeue" />
>      <camel:to uri="bean:someBean" />
>      <camel:to uri="someProcessor" />
>   </camel:route>
> Depending on the environment, there can be more than entry points i.e.
> multiple queue's to consume from. For ex: on QA env there is only 1 queue,
> on Production there are 3 queues.
> I see there are loadbalancer and dynamicRouter component but those are only
> used in "to" part of route (atleast from examples I see).

I don't think you can do it with spring configure.
But if you are using Java DSL, you can create the RouteBuilder with 
upper route configure  dynamically, and set the from endpoint as you 
want, then add it into the CamelContext as many as you want.

> So I was wondering if I can create routes dynamically using above route as
> template. On start up, look at number of queue's and than for each queue
> create copy of above route.
> Or is there any better way to do this?
> Thanks!

Apache Camel, Apache CXF committer
Open Source Integration:
Blog: (English)

View raw message