[ 
https://issues.apache.org/jira/browse/CAMEL-6840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16509139#comment-16509139
 ] 

ASF GitHub Bot commented on CAMEL-6840:
---------------------------------------

WillemJiang commented on issue #2366: CAMEL-6840 make it possible grouped 
throttling
URL: https://github.com/apache/camel/pull/2366#issuecomment-396458291
 
 
   I just have a quick look at the code, the schema is updated, but there are 
something wrong with the xml file.
   As the ThrottleDefinition is extends from ExpressionNode, but the first 
element of ExpressionNode is a reference of expression element, not the 
correlationExpression that you want.
   So you keep getting the complain message.
   
   Once I put the correlationExpression as the last element of throttle, I 
don't get the error message anymore. (but the test is freeze ). 
   
   ```
   <route errorHandlerRef="dlc">
     <from uri="seda:b"/>
     <throttle timePeriodMillis="1000">
       <header>max</header>
       <to uri="log:result"/>
       <to uri="mock:result"/>
       <correlationExpression>
         <constant>2</constant>
       </correlationExpression>
     </throttle>
   </route>
   ```
   
   We need to address the element order first to fix this issue.
   
   BTW, I also find an issue in the ThrottleDefinition, to support to old XML 
which has no correlationExpression, we need to specify the element as an 
optional one.
   Just like this :
   
   ```
   @XmlElements({
       @XmlElement(name = "correlationExpression", type = 
ExpressionSubElementDefinition.class)}
   )
   private ExpressionSubElementDefinition correlationExpression;
   
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Allow Throttler EIP to specify SLA per client/correlated-group
> --------------------------------------------------------------
>
>                 Key: CAMEL-6840
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6840
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core, eip
>            Reporter: Christian Posta
>            Assignee: Önder Sezgin
>            Priority: Major
>             Fix For: 2.22.0
>
>
> Basic idea is to allow throttler to have a predicate to determine whether or 
> not to apply throttling to that exchange. 
> From this Mailing List discussion:
> http://camel.465427.n5.nabble.com/Throttling-by-client-ID-td5741032.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to