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

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


The following commit(s) were added to refs/heads/main by this push:
     new 3270c10bf0e CAMEL-18098: camel-core - Stream caching should not spool 
to disk by default
3270c10bf0e is described below

commit 3270c10bf0e03439e7a2e6cf4df1a8a86f4c3990
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed May 11 16:04:56 2022 +0200

    CAMEL-18098: camel-core - Stream caching should not spool to disk by default
---
 core/camel-spring-boot/src/main/docs/spring-boot.json       |  9 ++++++++-
 .../camel/spring/boot/CamelConfigurationProperties.java     | 13 ++++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.json 
b/core/camel-spring-boot/src/main/docs/spring-boot.json
index 488ddcf758c..37df44069a6 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.json
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.json
@@ -1028,7 +1028,7 @@
     {
       "name": "camel.springboot.stream-caching-enabled",
       "type": "java.lang.Boolean",
-      "description": "Sets whether stream caching is enabled or not. While 
stream types (like StreamSource, InputStream and Reader) are commonly used in 
messaging for performance reasons, they also have an important drawback: they 
can only be read once. In order to be able to work with message content 
multiple times, the stream needs to be cached. Streams are cached in memory. 
However, for large stream messages (over 128 KB by default) will be cached in a 
temporary file instead, and Came [...]
+      "description": "Sets whether stream caching is enabled or not. While 
stream types (like StreamSource, InputStream and Reader) are commonly used in 
messaging for performance reasons, they also have an important drawback: they 
can only be read once. In order to be able to work with message content 
multiple times, the stream needs to be cached. Streams are cached in memory 
only (by default). If streamCachingSpoolEnabled=true, then, for large stream 
messages (over 128 KB by default) wi [...]
       "sourceType": 
"org.apache.camel.spring.boot.CamelConfigurationProperties",
       "defaultValue": true
     },
@@ -1051,6 +1051,13 @@
       "description": "Sets the stream caching spool (temporary) directory to 
use for overflow and spooling to disk. If no spool directory has been explicit 
configured, then a temporary directory is created in the java.io.tmpdir 
directory.",
       "sourceType": "org.apache.camel.spring.boot.CamelConfigurationProperties"
     },
+    {
+      "name": "camel.springboot.stream-caching-spool-enabled",
+      "type": "java.lang.Boolean",
+      "description": "To enable stream caching spooling to disk. This means, 
for large stream messages (over 128 KB by default) will be cached in a 
temporary file instead, and Camel will handle deleting the temporary file once 
the cached stream is no longer necessary. Default is false.",
+      "sourceType": 
"org.apache.camel.spring.boot.CamelConfigurationProperties",
+      "defaultValue": false
+    },
     {
       "name": "camel.springboot.stream-caching-spool-threshold",
       "type": "java.lang.Long",
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 d6ea11087b3..f5467f2ceb6 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
@@ -282,7 +282,9 @@ public class CamelConfigurationProperties extends 
DefaultConfigurationProperties
      * reasons, they also have an important drawback: they can only be read 
once. In order to be able to work with
      * message content multiple times, the stream needs to be cached.
      *
-     * Streams are cached in memory. However, for large stream messages (over 
128 KB by default) will be cached in a
+     * Streams are cached in memory only (by default).
+     *
+     * If streamCachingSpoolEnabled=true, then, for large stream messages 
(over 128 KB by default) will be cached in a
      * temporary file instead, and Camel will handle deleting the temporary 
file once the cached stream is no longer
      * necessary.
      *
@@ -290,6 +292,15 @@ public class CamelConfigurationProperties extends 
DefaultConfigurationProperties
      */
     private boolean streamCachingEnabled = true;
 
+    /**
+     * To enable stream caching spooling to disk. This means, for large stream 
messages (over 128 KB by default) will be cached in a
+     * temporary file instead, and Camel will handle deleting the temporary 
file once the cached stream is no longer
+     * necessary.
+     *
+     * Default is false.
+     */
+    private boolean streamCachingSpoolEnabled;
+
     /**
      * Sets the stream caching spool (temporary) directory to use for overflow 
and spooling to disk.
      *

Reply via email to