diff --git a/kamelets/throttle-action.kamelet.yaml b/kamelets/throttle-action.kamelet.yaml index 489868121..681c9c95a 100644 --- a/kamelets/throttle-action.kamelet.yaml +++ b/kamelets/throttle-action.kamelet.yaml @@ -32,13 +32,18 @@ spec: title: "Throttle Action" description: "The Throttle action allows you to ensure that a specific sink does not get overloaded." required: - - maxConcurrentRequests + - 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 489868121..681c9c95a 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 @@ -32,13 +32,18 @@ spec: title: "Throttle Action" description: "The Throttle action allows you to ensure that a specific sink does not get overloaded." required: - - maxConcurrentRequests + - 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}}"