camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cristiano Costantini <>
Subject Re: Documentation of using bean: endpoint in a <from>
Date Wed, 18 Feb 2015 11:55:02 GMT
...sorry I was sending my last message at the same time of you and I didn't
read your reply,

using timer with scheduler is in fact the actual way I do implement that, I
would have liked the alternative to use bean as input as it improves
readability of the routes (I mostly use the spring xml dsl).

Think of it, maybe a beansched: endpoint ;-)

Thank you very much!

Il giorno Wed Feb 18 2015 at 12:46:36 Cristiano Costantini <> ha scritto:

> ah!
> I just discovered that Claus you did eliminated that feature 4 days ago on
> the master branch! =>
> Well, can it be considered to have it, maybe on a different camel
> component (i.e. a new "beanplus:" component that extends "bean:" and ALSO
> supports consumers) together with the previous optional parameters to
> enable better control the flow of the potentially infinite loop ?
> Could you please let me know your vision so I can orient my current
> developments,
> thank you very much,
> Cristiano
> Il giorno Wed Feb 18 2015 at 12:31:07 Cristiano Costantini <
>> ha scritto:
> Hi All,
>> I discovered casually that you can use a bean endpoint in a from (I did
>> an error and it started out an infinite loop of exchanges)
>> I checked the documentation
>> but it still says that "A bean: endpoint cannot be defined as the input
>> to the route",
>> but then I've found in this message
>> that it is instead possible and it does call the method infinitely from a
>> single threaded consumer!
>> So, is this a feature that is not documented and I can use it safely (I
>> do take the responsibility to control the flow in the bean with sleeps or
>> whatever I need to avoid infinite loops), or is this going to be removed in
>> a next Camel releases?
>> Since how long is this feature available? (I'm now usingCamel 2.13.2, I
>> remember I tried time ago to use a bean: in a from but I got an exception
>> that the route could not be initialized...)
>> By the way, It could be nice to add a URI parameter to bean: that enable
>> to slow down the maximum rate (maybe using a ScheduledExecutorService.scheduleAtFixedRate
>> or ScheduledExecutorService.scheduleAtFixedDelay from a Executors.
>> newSingleThreadScheduledExecutor() ) and a "retry time" to be used in
>> case of exceptions (which could be useful as if the bean gives an
>> exception, it could have lost its capability to control the flow and then
>> as a Route designer I want to limit the impact and avoid the infinite loop).
>> Thank you !
>> Cristiano

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message