ah!
I just discovered that Claus you did eliminated that feature 4 days ago on
the master branch! =>

https://github.com/apache/camel/commit/727b3a74b7383f16ae797ed58b478755d64c2693

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 <
cristiano.costant...@gmail.com> 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
> http://camel.apache.org/bean.html
> 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
> http://camel.465427.n5.nabble.com/Consume-from-a-java-bean-td5743580.html
> 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
>
>
>

Reply via email to