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


The following commit(s) were added to refs/heads/main by this push:
     new e51fa7a9 JMS Kamelets: Expose Connection Pool parameters to make it 
customizable (#2113)
e51fa7a9 is described below

commit e51fa7a9815a57a535560c973ad4eb9f0fad3361
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Tue Jul 16 15:15:50 2024 +0200

    JMS Kamelets: Expose Connection Pool parameters to make it customizable 
(#2113)
    
    Signed-off-by: Andrea Cosentino <anco...@gmail.com>
---
 .../jms-pooled-apache-artemis-sink.kamelet.yaml    | 20 +++++++++++++++++++-
 .../jms-pooled-apache-artemis-source.kamelet.yaml  | 22 ++++++++++++++++++++--
 .../jms-pooled-apache-artemis-sink.kamelet.yaml    | 20 +++++++++++++++++++-
 .../jms-pooled-apache-artemis-source.kamelet.yaml  | 22 ++++++++++++++++++++--
 4 files changed, 78 insertions(+), 6 deletions(-)

diff --git a/kamelets/jms-pooled-apache-artemis-sink.kamelet.yaml 
b/kamelets/jms-pooled-apache-artemis-sink.kamelet.yaml
index 2dc76f85..fbb4076c 100644
--- a/kamelets/jms-pooled-apache-artemis-sink.kamelet.yaml
+++ b/kamelets/jms-pooled-apache-artemis-sink.kamelet.yaml
@@ -67,7 +67,22 @@ spec:
         x-descriptors:
         - urn:camel:group:credentials
         - urn:keda:authentication:password
-        - urn:keda:required   
+        - urn:keda:required
+      maxSessionsPerConnection:
+        title: "Max Sessions Per Connection"
+        description: "The maximum number of pooled sessions per connection in 
the pool"
+        type: int
+        default: 500 
+      maxIdleSessionsPerConnection:
+        title: "Max Idle Sessions Per Connection"
+        description: "The number of idle sessions allowed per connection 
before they are closed."
+        type: int
+        default: 500
+      connectionIdleTimeout:
+        title: "Connection Idle Timeout"
+        description: "The maximum time a pooled Connection can sit unused 
before it is eligible for removal (in milliseconds)"
+        type: int
+        default: 30000     
   dependencies:
   - "camel:jms"
   - "camel:kamelet"
@@ -85,6 +100,9 @@ spec:
         type: "#class:org.messaginghub.pooled.jms.JmsPoolConnectionFactory"
         properties:
           connectionFactory: '#bean:{{connectionFactoryBean}}'
+          maxSessionsPerConnection: "{{maxSessionsPerConnection}}"
+          maxIdleSessionsPerConnection: "{{maxIdleSessionsPerConnection}}"
+          connectionIdleTimeout: "{{connectionIdleTimeout}}"
     from:
       uri: "kamelet:source"
       steps:
diff --git a/kamelets/jms-pooled-apache-artemis-source.kamelet.yaml 
b/kamelets/jms-pooled-apache-artemis-source.kamelet.yaml
index 362a2e64..41b105f0 100644
--- a/kamelets/jms-pooled-apache-artemis-source.kamelet.yaml
+++ b/kamelets/jms-pooled-apache-artemis-source.kamelet.yaml
@@ -66,7 +66,22 @@ spec:
         x-descriptors:
         - urn:camel:group:credentials
         - urn:keda:authentication:password
-        - urn:keda:required        
+        - urn:keda:required
+      maxSessionsPerConnection:
+        title: "Max Session Per Connection"
+        description: "The maximum number of pooled sessions per connection in 
the pool"
+        type: int
+        default: 500
+      maxIdleSessionsPerConnection:
+        title: "Max Idle Sessions Per Connection"
+        description: "The number of idle sessions allowed per connection 
before they are closed."
+        type: int
+        default: 500
+      connectionIdleTimeout:
+        title: "Connection Idle Timeout"
+        description: "The maximum time a pooled Connection can sit unused 
before it is eligible for removal (in milliseconds)"
+        type: int
+        default: 30000       
   dependencies:
   - "camel:jms"
   - "camel:kamelet"
@@ -83,7 +98,10 @@ spec:
       - name: pooledFactoryBean
         type: "#class:org.messaginghub.pooled.jms.JmsPoolConnectionFactory"
         properties:
-          connectionFactory: '#bean:{{connectionFactoryBean}}'        
+          connectionFactory: '#bean:{{connectionFactoryBean}}'
+          maxSessionsPerConnection: "{{maxSessionsPerConnection}}"
+          maxIdleSessionsPerConnection: "{{maxIdleSessionsPerConnection}}"
+          connectionIdleTimeout: "{{connectionIdleTimeout}}"        
     from:
       uri: "jms:{{destinationType}}:{{destinationName}}"
       parameters:
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/jms-pooled-apache-artemis-sink.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/jms-pooled-apache-artemis-sink.kamelet.yaml
index 2dc76f85..fbb4076c 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/jms-pooled-apache-artemis-sink.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/jms-pooled-apache-artemis-sink.kamelet.yaml
@@ -67,7 +67,22 @@ spec:
         x-descriptors:
         - urn:camel:group:credentials
         - urn:keda:authentication:password
-        - urn:keda:required   
+        - urn:keda:required
+      maxSessionsPerConnection:
+        title: "Max Sessions Per Connection"
+        description: "The maximum number of pooled sessions per connection in 
the pool"
+        type: int
+        default: 500 
+      maxIdleSessionsPerConnection:
+        title: "Max Idle Sessions Per Connection"
+        description: "The number of idle sessions allowed per connection 
before they are closed."
+        type: int
+        default: 500
+      connectionIdleTimeout:
+        title: "Connection Idle Timeout"
+        description: "The maximum time a pooled Connection can sit unused 
before it is eligible for removal (in milliseconds)"
+        type: int
+        default: 30000     
   dependencies:
   - "camel:jms"
   - "camel:kamelet"
@@ -85,6 +100,9 @@ spec:
         type: "#class:org.messaginghub.pooled.jms.JmsPoolConnectionFactory"
         properties:
           connectionFactory: '#bean:{{connectionFactoryBean}}'
+          maxSessionsPerConnection: "{{maxSessionsPerConnection}}"
+          maxIdleSessionsPerConnection: "{{maxIdleSessionsPerConnection}}"
+          connectionIdleTimeout: "{{connectionIdleTimeout}}"
     from:
       uri: "kamelet:source"
       steps:
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/jms-pooled-apache-artemis-source.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/jms-pooled-apache-artemis-source.kamelet.yaml
index 362a2e64..41b105f0 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/jms-pooled-apache-artemis-source.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/jms-pooled-apache-artemis-source.kamelet.yaml
@@ -66,7 +66,22 @@ spec:
         x-descriptors:
         - urn:camel:group:credentials
         - urn:keda:authentication:password
-        - urn:keda:required        
+        - urn:keda:required
+      maxSessionsPerConnection:
+        title: "Max Session Per Connection"
+        description: "The maximum number of pooled sessions per connection in 
the pool"
+        type: int
+        default: 500
+      maxIdleSessionsPerConnection:
+        title: "Max Idle Sessions Per Connection"
+        description: "The number of idle sessions allowed per connection 
before they are closed."
+        type: int
+        default: 500
+      connectionIdleTimeout:
+        title: "Connection Idle Timeout"
+        description: "The maximum time a pooled Connection can sit unused 
before it is eligible for removal (in milliseconds)"
+        type: int
+        default: 30000       
   dependencies:
   - "camel:jms"
   - "camel:kamelet"
@@ -83,7 +98,10 @@ spec:
       - name: pooledFactoryBean
         type: "#class:org.messaginghub.pooled.jms.JmsPoolConnectionFactory"
         properties:
-          connectionFactory: '#bean:{{connectionFactoryBean}}'        
+          connectionFactory: '#bean:{{connectionFactoryBean}}'
+          maxSessionsPerConnection: "{{maxSessionsPerConnection}}"
+          maxIdleSessionsPerConnection: "{{maxIdleSessionsPerConnection}}"
+          connectionIdleTimeout: "{{connectionIdleTimeout}}"        
     from:
       uri: "jms:{{destinationType}}:{{destinationName}}"
       parameters:

Reply via email to