On Sat, Mar 9, 2013 at 1:18 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:

>
> 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);
>
>
Thanks Christian, Claus, I thought of the dynamic route option but that
seems overly complicated.

For the moment I'm using Timer and HTTP components in an integration test
just to get things working. Anonymous Processors before and after the HTTP
component are handling the dynamic parameter in the feed URL.

A little more info...the Atom feed being consumed is part of an
Atom/AtomPub service we've built for the purposes of information
integration with external systems (ala AtomServer). While it's tempting to
add a "followNext" feature/parameter to the existing Atom component, for
now this is only an example/demo of using Java/Camel as client to our
service. If we have enough external systems using Java to consume our
service, than perhaps we'll develop a custom Component that make things
simple.

Thanks again,
Doug

Reply via email to