camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Throttle and threads together
Date Thu, 20 Apr 2017 09:35:11 GMT
If you use both throttle and threads then they each process the
message using a thread pool. It may not make as much sense to use both
of them.

If using both you also may end up with the throttler and the threads
not keeping the same pace when processing messages, and you end up
with pending messages waiting in the thread pool queue list.



On Thu, Apr 20, 2017 at 12:11 AM, Robson Vargas Farias
<robsonvargasfarias@gmail.com> wrote:
> Hi, I'm working with a camel route and I'd like to understand the mix
> between throttle and threads:
>
>
>
> If I introduce on the <camel:throttle configuration a value for the
> executorServiceRef, will it execute the same way as wrapped by the
> <camel:threads tag?
>
>
>
>         <camel:route id="my_route">
>
>                                            <camel:from ref="mq_endpoint" />
>
>                                            <camel:throttle
> timePeriodMillis="1000" asyncDelayed="true" executorServiceRef="my_thread_
> pool_profile">
>
>                                                           <camel:to
> ref="processor_handler_endpoint" />
>
>                                                           ..
>
>
>
> is the same as:
>
>
>
>                              <camel:route id="my_route">
>
>                                            <camel:from ref="mq_endpoint" />
>
>                                            <camel:throttle
> timePeriodMillis="1000">
>
>                                                           <camel:simple>10
>
>                                                           </camel:simple>
>
>                                                           <camel:threads
> executorServiceRef="my_thread_pool_profile">
>
>
> <camel:to ref="processor_handler_endpoint" />
>
>                                                                         ..
>
>
>
> ?
>
>
>
> Thanks,
>
>
>
> Robson



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message