Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ThrottlingInflightRoutePolicy

...

titleThrottlingInflightRoutePolicy compared to the [Throttler] EIP

The ThrottlingInflightRoutePolicy

...

is triggered when an Exchange is complete, which means that it requires at least one Exchange to be complete before it works.

The throttling inflight route policy has the following options:

Option

Default

Description

scope

Route

A scope for either Route or Context which defines if the current number of inflight exchanges is context based or for that particular route.

maxInflightExchanges

1000

The maximum threshold when the throttling will start to suspend the route if the current number of inlfight exchanges is higher than this value.

resumePercentOfMax

70

A percentage 0..100 which defines when the throttling should resume again in case it has been suspended.

loggingLevel

INFO

The logging level used for logging the throttling activity.

logger

ThrottlingInflightRoutePolicy

The logger category.

Info
titleThrottlingInflightRoutePolicy compared to the [Throttler] EIP

The ThrottlingInflightRoutePolicy compared to Throttler is that it does not block during throttling. It does throttling that is approximate based, meaning that its more coarse grained and not explicit precise as the Throttler. The Throttler can be much more accurate and only allow a specific number of messages being passed per a given time unit. Also the ThrottlingInflightRoutePolicy is based its metrics on number of inflight exchanges where as Throttler is based on number of messages per time unit.

Configuring policy

You configure the route policy as follows from Java DSL, using the routePolicy method:

...