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!



Willem
----------------------------------
Apache Camel, Apache CXF committer
Open Source Integration: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: http://twitter.com/willemjiang

Reply via email to