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

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

WillemJiang commented on a change in pull request #2376: CAMEL-6840 - add 
grouped throttling feature, XML DSL is not working p…
URL: https://github.com/apache/camel/pull/2376#discussion_r195887527
 
 

 ##########
 File path: camel-core/src/main/java/org/apache/camel/processor/Throttler.java
 ##########
 @@ -192,6 +217,26 @@ public boolean process(final Exchange exchange, final 
AsyncCallback callback) {
         }
     }
 
+    private DelayQueue<ThrottlePermit> locateDelayQueue(final Integer key) 
throws InterruptedException, ExecutionException {        
+        CompletableFuture<DelayQueue<ThrottlePermit>> futureDelayQueue = new 
CompletableFuture<>();
+
+        delayQueueCacheExecutorService.submit(() -> {
+            futureDelayQueue.complete(findDelayQueue(key));
+        });
+        DelayQueue<ThrottlePermit> currentQueue = futureDelayQueue.get();   
 
 Review comment:
   futrueDelayQueue.get() is wait for the future method to complete, it doesn't 
save us time.

----------------------------------------------------------------
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:
us...@infra.apache.org


> 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