Skip to content

Commit

Permalink
JMS Kamelets: Expose Connection Pool parameters to make it customizab…
Browse files Browse the repository at this point in the history
…le (#2113)

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
  • Loading branch information
oscerd committed Jul 16, 2024
1 parent 67565dd commit e51fa7a
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 6 deletions.
20 changes: 19 additions & 1 deletion kamelets/jms-pooled-apache-artemis-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down
22 changes: 20 additions & 2 deletions kamelets/jms-pooled-apache-artemis-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down

0 comments on commit e51fa7a

Please sign in to comment.