You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/01/23 11:02:57 UTC

(camel-kamelets) 01/03: Review Throttle Action

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch 1842
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 61bbc28249b130c5fbf707a3b785260eb80c4c2f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jan 23 11:58:57 2024 +0100

    Review Throttle Action
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/throttle-action.kamelet.yaml                      | 14 ++++----------
 .../main/resources/kamelets/throttle-action.kamelet.yaml   | 12 +++---------
 2 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/kamelets/throttle-action.kamelet.yaml b/kamelets/throttle-action.kamelet.yaml
index 681c9c95..a611e72e 100644
--- a/kamelets/throttle-action.kamelet.yaml
+++ b/kamelets/throttle-action.kamelet.yaml
@@ -34,16 +34,11 @@ spec:
     required:
       - messages
     properties:
-      messages:
-        title: Messages Number
-        description: The number of messages to send in the time period set
+      maxConcurrentRequests:
+        title: Max Concurrent Requests
+        description: The number of concurrent requests
         type: integer
         example: 10
-      timePeriod:
-        title: Time Period
-        description: Sets the time period during which the maximum request count is valid for, in milliseconds
-        type: string
-        default: "1000"
     type: object
   dependencies:
     - "camel:core"
@@ -53,5 +48,4 @@ spec:
       uri: kamelet:source
       steps:
       - throttle:
-          constant: "{{messages}}"
-          timePeriodMillis: "{{timePeriod}}"
+          constant: "{{maxConcurrentRequests}}"
diff --git a/library/camel-kamelets/src/main/resources/kamelets/throttle-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/throttle-action.kamelet.yaml
index 681c9c95..0c109cdf 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/throttle-action.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/throttle-action.kamelet.yaml
@@ -34,16 +34,11 @@ spec:
     required:
       - messages
     properties:
-      messages:
-        title: Messages Number
-        description: The number of messages to send in the time period set
+      maxConcurrentRequests:
+        title: Max Concurrent Requests
+        description: The number of concurrent requests
         type: integer
         example: 10
-      timePeriod:
-        title: Time Period
-        description: Sets the time period during which the maximum request count is valid for, in milliseconds
-        type: string
-        default: "1000"
     type: object
   dependencies:
     - "camel:core"
@@ -54,4 +49,3 @@ spec:
       steps:
       - throttle:
           constant: "{{messages}}"
-          timePeriodMillis: "{{timePeriod}}"