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

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/master by this push:
     new 3195950  CAMEL-16222: camel-core - ExchangeFactory SPI to allow to use 
exchange pooling
3195950 is described below

commit 319595064095365aa5ad1f1bd4a6e8b1b81dd2da
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Thu Feb 25 09:01:38 2021 +0100

    CAMEL-16222: camel-core - ExchangeFactory SPI to allow to use exchange 
pooling
---
 core/camel-spring-boot/src/main/docs/spring-boot.adoc   |  5 ++++-
 .../camel/spring/boot/CamelConfigurationProperties.java | 17 ++++++++++++++++-
 docs/modules/ROOT/pages/spring-boot.adoc                |  5 ++++-
 tooling/camel-spring-boot-dependencies/pom.xml          |  2 +-
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.adoc 
b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
index 2aaca84..9b5fd21 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -92,7 +92,7 @@ When using spring-boot with Spring Boot make sure to use the 
following Maven dep
 ----
 
 
-The component supports 165 options, which are listed below.
+The component supports 168 options, which are listed below.
 
 
 
@@ -162,6 +162,9 @@ The component supports 165 options, which are listed below.
 | *camel.springboot.endpoint-bridge-error-handler* | Allows for bridging the 
consumer to the Camel routing Error Handler, which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages, or the likes, will 
now be processed as a message and handled by the routing Error Handler. <p/> By 
default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal 
with exceptions, that will be logged at WARN/ERROR level and ignored. The 
default value is false.  [...]
 | *camel.springboot.endpoint-lazy-start-producer* | Whether the producer 
should be started lazy (on the first message). By starting lazy you can use 
this to allow CamelContext and routes to startup in situations where a producer 
may otherwise fail during starting and cause the route to fail being started. 
By deferring this startup to be lazy then the startup failure can be handled 
during routing messages via Camel's routing error handlers. Beware that when 
the first message is processed  [...]
 | *camel.springboot.endpoint-runtime-statistics-enabled* | Sets whether 
endpoint runtime statistics is enabled (gathers runtime usage of each incoming 
and outgoing endpoints). The default value is false. | false | Boolean
+| *camel.springboot.exchange-factory* | Controls whether to pool (reuse) 
exchanges or create new fresh exchanges (default). Using pooled will reduce JVM 
garbage collection overhead by avoiding to re-create Exchange instances per 
message each consumer receives. | default | String
+| *camel.springboot.exchange-factory-capacity* | The capacity the pool (for 
each consumer) uses for storing exchanges. The default capacity is 100. | 100 | 
Integer
+| *camel.springboot.exchange-factory-statistics-enabled* | Configures whether 
statistics is enabled on exchange factory. | false | Boolean
 | *camel.springboot.file-configurations* | Directory to load additional 
configuration files that contains configuration values that takes precedence 
over any other configuration. This can be used to refer to files that may have 
secret configuration that has been mounted on the file system for containers. 
You must use either file: or classpath: as prefix to load from file system or 
classpath. Then you can specify a pattern to load from sub directories and a 
name pattern such as file:/var/ [...]
 | *camel.springboot.include-non-singletons* | Whether to include non-singleton 
beans (prototypes) when scanning for RouteBuilder instances. By default only 
singleton beans is included in the context scan. | false | Boolean
 | *camel.springboot.inflight-repository-browse-enabled* | Sets whether the 
inflight repository should allow browsing each inflight exchange. This is by 
default disabled as there is a very slight performance overhead when enabled. | 
false | Boolean
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
index 74fb892..90d0427 100644
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
+++ 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
@@ -20,7 +20,6 @@ import org.apache.camel.LoggingLevel;
 import org.apache.camel.ManagementStatisticsLevel;
 import org.apache.camel.StartupSummaryLevel;
 import org.apache.camel.main.DefaultConfigurationProperties;
-import org.apache.camel.spi.Metadata;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 @ConfigurationProperties(prefix = "camel.springboot")
@@ -651,6 +650,22 @@ public class CamelConfigurationProperties extends 
DefaultConfigurationProperties
     private boolean lightweight;
 
     /**
+     * Controls whether to pool (reuse) exchanges or create new fresh 
exchanges (default). Using pooled will reduce JVM
+     * garbage collection overhead by avoiding to re-create Exchange instances 
per message each consumer receives.
+     */
+    private String exchangeFactory = "default";
+
+    /**
+     * The capacity the pool (for each consumer) uses for storing exchanges. 
The default capacity is 100.
+     */
+    private int exchangeFactoryCapacity = 100;
+
+    /**
+     * Configures whether statistics is enabled on exchange factory.
+     */
+    private boolean exchangeFactoryStatisticsEnabled;
+
+    /**
      * To use startup recorder for capturing execution time during starting 
Camel. The recorder can be one of: false,
      * logging, java-flight-recorder
      *
diff --git a/docs/modules/ROOT/pages/spring-boot.adoc 
b/docs/modules/ROOT/pages/spring-boot.adoc
index 2aaca84..21b15c6 100644
--- a/docs/modules/ROOT/pages/spring-boot.adoc
+++ b/docs/modules/ROOT/pages/spring-boot.adoc
@@ -92,7 +92,7 @@ When using spring-boot with Spring Boot make sure to use the 
following Maven dep
 ----
 
 
-The component supports 165 options, which are listed below.
+The component supports 168 options, which are listed below.
 
 
 
@@ -162,6 +162,9 @@ The component supports 165 options, which are listed below.
 | *camel.springboot.endpoint-bridge-error-handler* | Allows for bridging the 
consumer to the Camel routing Error Handler, which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages, or the likes, will 
now be processed as a message and handled by the routing Error Handler. <p/> By 
default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal 
with exceptions, that will be logged at WARN/ERROR level and ignored. The 
default value is false.  [...]
 | *camel.springboot.endpoint-lazy-start-producer* | Whether the producer 
should be started lazy (on the first message). By starting lazy you can use 
this to allow CamelContext and routes to startup in situations where a producer 
may otherwise fail during starting and cause the route to fail being started. 
By deferring this startup to be lazy then the startup failure can be handled 
during routing messages via Camel's routing error handlers. Beware that when 
the first message is processed  [...]
 | *camel.springboot.endpoint-runtime-statistics-enabled* | Sets whether 
endpoint runtime statistics is enabled (gathers runtime usage of each incoming 
and outgoing endpoints). The default value is false. | false | Boolean
+| *camel.springboot.exchange-factory* |  |  | String
+| *camel.springboot.exchange-factory-capacity* |  |  | Integer
+| *camel.springboot.exchange-factory-statistics-enabled* |  |  | Boolean
 | *camel.springboot.file-configurations* | Directory to load additional 
configuration files that contains configuration values that takes precedence 
over any other configuration. This can be used to refer to files that may have 
secret configuration that has been mounted on the file system for containers. 
You must use either file: or classpath: as prefix to load from file system or 
classpath. Then you can specify a pattern to load from sub directories and a 
name pattern such as file:/var/ [...]
 | *camel.springboot.include-non-singletons* | Whether to include non-singleton 
beans (prototypes) when scanning for RouteBuilder instances. By default only 
singleton beans is included in the context scan. | false | Boolean
 | *camel.springboot.inflight-repository-browse-enabled* | Sets whether the 
inflight repository should allow browsing each inflight exchange. This is by 
default disabled as there is a very slight performance overhead when enabled. | 
false | Boolean
diff --git a/tooling/camel-spring-boot-dependencies/pom.xml 
b/tooling/camel-spring-boot-dependencies/pom.xml
index 678263d..a1b6814 100644
--- a/tooling/camel-spring-boot-dependencies/pom.xml
+++ b/tooling/camel-spring-boot-dependencies/pom.xml
@@ -4291,7 +4291,7 @@
       <dependency>
         <groupId>org.knowm.xchange</groupId>
         <artifactId>xchange-core</artifactId>
-        <version>5.0.4</version>
+        <version>5.0.6</version>
       </dependency>
       <dependency>
         <groupId>org.mozilla</groupId>

Reply via email to