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

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

commit 5d64f60d574a6dd3c0bdbdb56f07851f610c3ec5
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Feb 24 07:54:31 2021 +0100

    CAMEL-16222: PooledExchangeFactory experiment
---
 .../META-INF/camel-main-configuration-metadata.json       |  4 ++--
 core/camel-main/src/main/docs/main.adoc                   |  4 ++--
 .../apache/camel/main/DefaultConfigurationProperties.java | 15 ++++++---------
 3 files changed, 10 insertions(+), 13 deletions(-)

diff --git 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 076f94a..6709f97 100644
--- 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -33,7 +33,7 @@
     { "name": "camel.main.endpointBridgeErrorHandler", "description": "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. 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 va [...]
     { "name": "camel.main.endpointLazyStartProducer", "description": "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 mes [...]
     { "name": "camel.main.endpointRuntimeStatisticsEnabled", "description": 
"Sets whether endpoint runtime statistics is enabled (gathers runtime usage of 
each incoming and outgoing endpoints). The default value is false.", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"boolean", "javaType": "boolean" },
-    { "name": "camel.main.exchangeFactory", "description": "Experimental: 
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.", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"string", "javaType": "java.lang.String", "defaultValue": "default", "enum": [ 
"default", "pooled" ] },
+    { "name": "camel.main.exchangeFactory", "description": "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.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "defaultValue": "default", "enum": [ "default", 
"pooled" ] },
     { "name": "camel.main.exchangeFactoryStatisticsEnabled", "description": 
"Configures whether statistics is enabled on exchange factory.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean" },
     { "name": "camel.main.fileConfigurations", "description": "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 can specify a pattern to load from sub directories 
and a name pattern such as \/var\/app\/secret\/.properties, multiple 
directories can be separated by comma.", " [...]
     { "name": "camel.main.inflightRepositoryBrowseEnabled", "description": 
"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.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean" },
@@ -42,7 +42,7 @@
     { "name": "camel.main.jmxEnabled", "description": "Enable JMX in your 
Camel application.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true },
     { "name": "camel.main.jmxManagementNamePattern", "description": "The 
naming pattern for creating the CamelContext JMX management name. The default 
pattern is #name#", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "defaultValue": "#name#" },
     { "name": "camel.main.jmxManagementStatisticsLevel", "description": "Sets 
the JMX statistics level, the level can be set to Extended to gather additional 
information The default value is Default.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "object", 
"javaType": "org.apache.camel.ManagementStatisticsLevel", "defaultValue": 
"Default", "enum": [ "Extended", "Default", "RoutesOnly", "Off" ] },
-    { "name": "camel.main.lightweight", "description": "Experimental: 
Configure the context to be lightweight. This will trigger some optimizations 
and memory reduction options. Lightweight context have some limitations. At 
this moment, dynamic endpoint destinations are not supported.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean" },
+    { "name": "camel.main.lightweight", "description": "Configure the context 
to be lightweight. This will trigger some optimizations and memory reduction 
options. Lightweight context have some limitations. At this moment, dynamic 
endpoint destinations are not supported.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean" },
     { "name": "camel.main.loadTypeConverters", "description": "Whether to load 
custom type converters by scanning classpath. This is used for backwards 
compatibility with Camel 2.x. Its recommended to migrate to use fast type 
converter loading by setting Converter(loader = true) on your custom type 
converter classes.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean" },
     { "name": "camel.main.logDebugMaxChars", "description": "Is used to limit 
the maximum length of the logging Camel message bodies. If the message body is 
longer than the limit, the log message is clipped. Use -1 to have unlimited 
length. Use for example 1000 to log at most 1000 characters.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", 
"javaType": "int" },
     { "name": "camel.main.logExhaustedMessageBody", "description": "Sets 
whether to log exhausted message body with message history. Default is false.", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"boolean", "javaType": "boolean" },
diff --git a/core/camel-main/src/main/docs/main.adoc 
b/core/camel-main/src/main/docs/main.adoc
index 9847bb0..38240f0 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -45,7 +45,7 @@ The following table lists all the options:
 | *camel.main.endpointBridgeError{zwsp}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. 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. |  | boolean
 | *camel.main.endpointLazyStart{zwsp}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 the [...]
 | *camel.main.endpointRuntime{zwsp}StatisticsEnabled* | Sets whether endpoint 
runtime statistics is enabled (gathers runtime usage of each incoming and 
outgoing endpoints). The default value is false. |  | boolean
-| *camel.main.exchangeFactory* | Experimental: 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.main.exchangeFactory* | 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.main.exchangeFactory{zwsp}StatisticsEnabled* | Configures whether 
statistics is enabled on exchange factory. |  | boolean
 | *camel.main.fileConfigurations* | 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 can 
specify a pattern to load from sub directories and a name pattern such as 
/var/app/secret/.properties, multiple directories can be separated by comma. |  
| String
 | *camel.main.inflightRepository{zwsp}BrowseEnabled* | 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. | 
 | boolean
@@ -54,7 +54,7 @@ The following table lists all the options:
 | *camel.main.jmxEnabled* | Enable JMX in your Camel application. | true | 
boolean
 | *camel.main.jmxManagementName{zwsp}Pattern* | The naming pattern for 
creating the CamelContext JMX management name. The default pattern is #name# | 
#name# | String
 | *camel.main.jmxManagement{zwsp}StatisticsLevel* | Sets the JMX statistics 
level, the level can be set to Extended to gather additional information The 
default value is Default. | Default | ManagementStatisticsLevel
-| *camel.main.lightweight* | Experimental: Configure the context to be 
lightweight. This will trigger some optimizations and memory reduction options. 
Lightweight context have some limitations. At this moment, dynamic endpoint 
destinations are not supported. |  | boolean
+| *camel.main.lightweight* | Configure the context to be lightweight. This 
will trigger some optimizations and memory reduction options. Lightweight 
context have some limitations. At this moment, dynamic endpoint destinations 
are not supported. |  | boolean
 | *camel.main.loadTypeConverters* | Whether to load custom type converters by 
scanning classpath. This is used for backwards compatibility with Camel 2.x. 
Its recommended to migrate to use fast type converter loading by setting 
Converter(loader = true) on your custom type converter classes. |  | boolean
 | *camel.main.logDebugMaxChars* | Is used to limit the maximum length of the 
logging Camel message bodies. If the message body is longer than the limit, the 
log message is clipped. Use -1 to have unlimited length. Use for example 1000 
to log at most 1000 characters. |  | int
 | *camel.main.logExhaustedMessage{zwsp}Body* | Sets whether to log exhausted 
message body with message history. Default is false. |  | boolean
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
index a62096a..4b12a76 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
@@ -919,9 +919,8 @@ public abstract class DefaultConfigurationProperties<T> {
     }
 
     /**
-     * Configure the context to be lightweight. This will trigger some 
optimizations and memory reduction
-     * options. Lightweight context have some limitations. At this moment, 
dynamic endpoint destinations are not
-     * supported.
+     * Configure the context to be lightweight. This will trigger some 
optimizations and memory reduction options.
+     * Lightweight context have some limitations. At this moment, dynamic 
endpoint destinations are not supported.
      */
     public void setLightweight(boolean lightweight) {
         this.lightweight = lightweight;
@@ -932,9 +931,8 @@ public abstract class DefaultConfigurationProperties<T> {
     }
 
     /**
-     * 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.
+     * 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.
      */
     public void setExchangeFactory(String exchangeFactory) {
         this.exchangeFactory = exchangeFactory;
@@ -1807,9 +1805,8 @@ public abstract class DefaultConfigurationProperties<T> {
     }
 
     /**
-     * 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.
+     * 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.
      */
     public T withExchangeFactory(String exchangeFactory) {
         this.exchangeFactory = exchangeFactory;

Reply via email to