I need to verify my understanding of the ThrottlingInflightRoutePolicy. I
have the following policy and route defined:

<bean id="myPolicy"
class="org.apache.camel.impl.ThrottlingInflightRoutePolicy">
        <property name="scope" value="Route"/>
        <property name="maxInflightExchanges" value="1000"/>
        <property name="resumePercentOfMax" value="70"/>
        <property name="loggingLevel" value="WARN"/>
  </bean>

    <route id="myRoute" startupOrder="1" routePolicyRef="myPolicy" >
        <from uri="activemq:queue:myQueue"/>
        <to uri="cxfrs:http://localhost:9999/MyService"; pattern="InOnly"/>
    </route>

My understanding is that, after each completed exchange the policy will
check the current number of exchanges that are "in-flight" and if that
number exceeds the maximumInflightExchanges, then it will suspend the route
until the percentage of "in-flight" exchanges reaches the resumePercentOfMax
number of exchanges. At that point, the route will be resumed. This will
have the impact of preventing the overloading of the cxfrs endpoint.

Is this correct?

If so, what does that mean for other routes that have a <to
uri="activemq:queue:myQueue" />, essentially dumping entries into myQueue?
Are the entries still pushed onto the queue, but just not picked up until
the route is resumed?

Lastly, is the "value" of the scope element for the policy specified as
"Route" or the name of the actual route? I'm assuming "Route" because the
actual route itself will specify the policy that it refers to.

Thanks for any assistance in answering these questions!


--
View this message in context: 
http://camel.465427.n5.nabble.com/ThrottlingInflightRoutePolicy-tp5713970.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to