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

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

commit 8d1e80451cbbbca29c8de2219cc5d8d7d276e617
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Fri Feb 9 14:45:54 2024 +0100

    Revert "Review Throttle Action"
    
    This reverts commit c1e5a47e403d07173aa192623fa2dfd4a64ba5b6.
---
 kamelets/throttle-action.kamelet.yaml                      | 14 ++++++++++----
 .../main/resources/kamelets/throttle-action.kamelet.yaml   | 12 +++++++++---
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/kamelets/throttle-action.kamelet.yaml 
b/kamelets/throttle-action.kamelet.yaml
index a611e72e..681c9c95 100644
--- a/kamelets/throttle-action.kamelet.yaml
+++ b/kamelets/throttle-action.kamelet.yaml
@@ -34,11 +34,16 @@ spec:
     required:
       - messages
     properties:
-      maxConcurrentRequests:
-        title: Max Concurrent Requests
-        description: The number of concurrent requests
+      messages:
+        title: Messages Number
+        description: The number of messages to send in the time period set
         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"
@@ -48,4 +53,5 @@ spec:
       uri: kamelet:source
       steps:
       - throttle:
-          constant: "{{maxConcurrentRequests}}"
+          constant: "{{messages}}"
+          timePeriodMillis: "{{timePeriod}}"
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 0c109cdf..681c9c95 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,11 +34,16 @@ spec:
     required:
       - messages
     properties:
-      maxConcurrentRequests:
-        title: Max Concurrent Requests
-        description: The number of concurrent requests
+      messages:
+        title: Messages Number
+        description: The number of messages to send in the time period set
         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"
@@ -49,3 +54,4 @@ spec:
       steps:
       - throttle:
           constant: "{{messages}}"
+          timePeriodMillis: "{{timePeriod}}"

Reply via email to