Just an update, as many users here may not be subscribed to dev or Zulip
chat: we have refactored the code so that it now supports 2 types of
throttlers. The original one used until 4.2.0 and the new one implemented
on 4.3.0. This should be available with Camel 4.4.0 (LTS).

Once 4.4.0 is out, please check the migration guide as well as the updated
Throttler EIP page to details about how to choose between each throttling
mode. If any problems are found, please provide feedback or open a ticket
on Jira.

Kind regards

On Fri, Feb 2, 2024 at 11:30 AM Jono Morris <j...@apache.org> wrote:

>
> The Throttler previously employed a fixed windows algorithm, allowing a
> fixed number of calls in a particular period. This is susceptible to
> request bursts, e.g. for a limit of 100 requests/hour, all 100 requests
> might be made in the first minute.
>
> Subsequently the algorithm was changed to a leaky bucket implementation.
> Callers try to acquire a permit and block if all the available permits have
> already been acquired. Permits are released after a caller completes
> processing.  So this limits the number of concurrent requests.
>
> Will discuss with the team to find the best way forward.
>
> Regards
> Jono
>
> On 2024/02/01 16:49:14 Otavio Rodolfo Piske wrote:
> > Hello,
> >
> > Quite frankly, I don't know.
> >
> > However, I did raise this question on the PR that introduced the change
> so
> > we can discuss how we can improve the documentation for scenarios such as
> > the one you raised.
> >
> > Kind regards
> >
> > On Wed, Jan 31, 2024 at 4:05 PM Schmeier, Jannik <j.schme...@fraport.de>
> > wrote:
> >
> > > Hello,
> > >
> > > I'm wondering why the timePeriodMillis option has been removed for the
> > > throttle EIP.
> > >
> > > I have an endpoint that can only receive about 5 requests per minute,
> else
> > > the request will fail. I accounted for that by using a timePeriodMillis
> > > setting of 60000 ms and a throttle value of 4.
> > > Now with the updated Throttle EIP I can't do that anymore.
> > >
> > > The upgrade guide suggests that the default time period is 1000 ms now,
> > > but obviously I can't work with that:
> > >
> https://camel.apache.org/manual/camel-4x-upgrade-guide-4_3.html#_throttle_eip
> > >
> > > Any suggestions?
> > >
> > > Best regards
> > >
> >
> >
> > --
> > Otavio R. Piske
> > http://orpiske.net
> >
>


-- 
Otavio R. Piske
http://orpiske.net

Reply via email to