On Fri, Mar 8, 2013 at 10:33 PM, Doug Douglass <douglass.d...@gmail.com> wrote:
> I'm familiar with dynamic to URI support in Camel[1], but I'm looking for
> ways to dynamically set the from URI or at least update a parameter in a
> from URI.
>
> Specifically, I'm using the Atom component to access a paged feed and want
> to follow "next" links to consume the entire feed (could total thousands to
> tens of thousands of entries) and then poll the feed. I'm currently using
> Camel 2.10.2, but can switch to any version if need be. Note that the Atom
> service I'm testing returns HTTP 304 if the "next" link has no updated
> entries; perhaps I should switch gears and use Timer and HTTP/HTTP4
> components and do my own processing via Abdera...
>
> Any tips are appreciated.
>

Lets say you can do that, how you would update the option? Using some
java code, JMX, or some other way?

It is of course possible to add functionality to the camel-atom
component so you can in some way define the uri in a dynamic way. Just
wonder what a good solution could be?

For example it could be a method call on a bean, that returns the uri to use.
Or an JMX operation can be added to the consumer to change the uri at
runtime etc.

Though currently you can add new routes when you have a new need for a
new dynamic uri. And if the old route should not longer be in service
you can stop and remove it.

If you use Java DSL then you can use a RouteBuilder as a skeleton for
the routes. And have maybe getter/setter on it to set the uri. and
then just

MyAtomRouteBuilder builder = ....
builder.setAtomUri(some new value here)

And then in the configure method you use getAtomUri to get that uri.

camelContext.addRoutes(builder);



> Doug
>
> [1] http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to