orpiske commented on code in PR #13040:
URL: https://github.com/apache/camel/pull/13040#discussion_r1481691129


##########
core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ThrottleReifier.java:
##########
@@ -33,30 +35,45 @@ public ThrottleReifier(Route route, ProcessorDefinition<?> 
definition) {
 
     @Override
     public Processor createProcessor() throws Exception {
+
         boolean async = parseBoolean(definition.getAsyncDelayed(), false);
         boolean shutdownThreadPool = willCreateNewThreadPool(definition, true);
         ScheduledExecutorService threadPool = 
getConfiguredScheduledExecutorService("Throttle", definition, true);
 
+        Expression correlation = null;
+        if (definition.getCorrelationExpression() != null) {
+            correlation = 
createExpression(definition.getCorrelationExpression());
+        }
+
+        boolean reject = parseBoolean(definition.getRejectExecution(), false);
         // max requests per period is mandatory
         Expression maxRequestsExpression = 
createMaxRequestsPerPeriodExpression();
         if (maxRequestsExpression == null) {
             throw new IllegalArgumentException("MaxRequestsPerPeriod 
expression must be provided on " + this);
         }
 
-        Expression correlation = null;
-        if (definition.getCorrelationExpression() != null) {
-            correlation = 
createExpression(definition.getCorrelationExpression());
-        }
+        if (ThrottlingMode.toMode(definition.getMode()) == 
ThrottlingMode.ConcurrentRequests) {

Review Comment:
   I may need a clarification here. I'll ping you on Zulip / Slack. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to