You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/03/17 07:36:50 UTC

[camel] 01/02: CAMEL-14395: camel-jms - Add option to turn off Artemis optimization for bytes messages

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.git

commit 893ca1c6be1784d039af6b77af06d886c3cf9abd
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Mar 17 07:55:30 2020 +0100

    CAMEL-14395: camel-jms - Add option to turn off Artemis optimization for bytes messages
---
 .../component/jms/JmsComponentConfigurer.java      |  2 +
 .../camel/component/jms/JmsEndpointConfigurer.java |  2 +
 .../org/apache/camel/component/jms/jms.json        |  2 +
 .../camel-jms/src/main/docs/jms-component.adoc     |  6 +-
 .../org/apache/camel/component/jms/JmsBinding.java |  7 +-
 .../apache/camel/component/jms/JmsComponent.java   |  8 +++
 .../camel/component/jms/JmsConfiguration.java      | 19 ++++--
 .../apache/camel/component/jms/JmsEndpoint.java    | 10 +++
 .../component/dsl/JmsComponentBuilderFactory.java  | 14 ++++
 .../endpoint/dsl/JmsEndpointBuilderFactory.java    | 78 ++++++++++++++++++++++
 .../modules/ROOT/pages/jms-component.adoc          |  6 +-
 11 files changed, 142 insertions(+), 12 deletions(-)

diff --git a/components/camel-jms/src/generated/java/org/apache/camel/component/jms/JmsComponentConfigurer.java b/components/camel-jms/src/generated/java/org/apache/camel/component/jms/JmsComponentConfigurer.java
index 947b2a1..ef20ab8 100644
--- a/components/camel-jms/src/generated/java/org/apache/camel/component/jms/JmsComponentConfigurer.java
+++ b/components/camel-jms/src/generated/java/org/apache/camel/component/jms/JmsComponentConfigurer.java
@@ -40,6 +40,8 @@ public class JmsComponentConfigurer extends PropertyConfigurerSupport implements
         case "allowSerializedHeaders": getOrCreateConfiguration(target).setAllowSerializedHeaders(property(camelContext, boolean.class, value)); return true;
         case "alwayscopymessage":
         case "alwaysCopyMessage": getOrCreateConfiguration(target).setAlwaysCopyMessage(property(camelContext, boolean.class, value)); return true;
+        case "artemisstreamingenabled":
+        case "artemisStreamingEnabled": getOrCreateConfiguration(target).setArtemisStreamingEnabled(property(camelContext, boolean.class, value)); return true;
         case "asyncconsumer":
         case "asyncConsumer": getOrCreateConfiguration(target).setAsyncConsumer(property(camelContext, boolean.class, value)); return true;
         case "asyncstartlistener":
diff --git a/components/camel-jms/src/generated/java/org/apache/camel/component/jms/JmsEndpointConfigurer.java b/components/camel-jms/src/generated/java/org/apache/camel/component/jms/JmsEndpointConfigurer.java
index bbff790..26cfee0 100644
--- a/components/camel-jms/src/generated/java/org/apache/camel/component/jms/JmsEndpointConfigurer.java
+++ b/components/camel-jms/src/generated/java/org/apache/camel/component/jms/JmsEndpointConfigurer.java
@@ -29,6 +29,8 @@ public class JmsEndpointConfigurer extends PropertyConfigurerSupport implements
         case "allowSerializedHeaders": target.getConfiguration().setAllowSerializedHeaders(property(camelContext, boolean.class, value)); return true;
         case "alwayscopymessage":
         case "alwaysCopyMessage": target.getConfiguration().setAlwaysCopyMessage(property(camelContext, boolean.class, value)); return true;
+        case "artemisstreamingenabled":
+        case "artemisStreamingEnabled": target.getConfiguration().setArtemisStreamingEnabled(property(camelContext, boolean.class, value)); return true;
         case "asyncconsumer":
         case "asyncConsumer": target.getConfiguration().setAsyncConsumer(property(camelContext, boolean.class, value)); return true;
         case "asyncstartlistener":
diff --git a/components/camel-jms/src/generated/resources/org/apache/camel/component/jms/jms.json b/components/camel-jms/src/generated/resources/org/apache/camel/component/jms/jms.json
index dc01398..04ffe16 100644
--- a/components/camel-jms/src/generated/resources/org/apache/camel/component/jms/jms.json
+++ b/components/camel-jms/src/generated/resources/org/apache/camel/component/jms/jms.json
@@ -76,6 +76,7 @@
     "allowAutoWiredConnectionFactory": { "kind": "property", "displayName": "Allow Auto Wired Connection Factory", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Whether to auto-discover ConnectionFactory from the registry, if no connection factory has been configured. If only one instance of ConnectionFactory is found then it will be used. This is enabled [...]
     "allowAutoWiredDestinationResolver": { "kind": "property", "displayName": "Allow Auto Wired Destination Resolver", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Whether to auto-discover DestinationResolver from the registry, if no destination resolver has been configured. If only one instance of DestinationResolver is found then it will be used. This  [...]
     "allowSerializedHeaders": { "kind": "property", "displayName": "Allow Serialized Headers", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Controls whether or not to include serialized headers. Applies only when transferExchange is true. This r [...]
+    "artemisStreamingEnabled": { "kind": "property", "displayName": "Artemis Streaming Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Whether optimizing for Apache Artemis streaming mode." },
     "asyncStartListener": { "kind": "property", "displayName": "Async Start Listener", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For example if a JmsCo [...]
     "asyncStopListener": { "kind": "property", "displayName": "Async Stop Listener", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Whether to stop the JmsConsumer message listener asynchronously, when stopping a route." },
     "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
@@ -174,6 +175,7 @@
     "replyToDestinationSelectorName": { "kind": "parameter", "displayName": "Reply To Destination Selector Name", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Sets the JMS Selector using the fixed name to be used so you can filter out your  [...]
     "streamMessageTypeEnabled": { "kind": "parameter", "displayName": "Stream Message Type Enabled", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Sets whether StreamMessage type is enabled or not. Message payloads of streamin [...]
     "allowSerializedHeaders": { "kind": "parameter", "displayName": "Allow Serialized Headers", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Controls whether or not to include serialized headers. Applies only when transferExchange is true. This  [...]
+    "artemisStreamingEnabled": { "kind": "parameter", "displayName": "Artemis Streaming Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Whether optimizing for Apache Artemis streaming mode." },
     "asyncStartListener": { "kind": "parameter", "displayName": "Async Start Listener", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For example if a JmsC [...]
     "asyncStopListener": { "kind": "parameter", "displayName": "Async Stop Listener", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Whether to stop the JmsConsumer message listener asynchronously, when stopping a route." },
     "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
diff --git a/components/camel-jms/src/main/docs/jms-component.adoc b/components/camel-jms/src/main/docs/jms-component.adoc
index 2a122b2..274403a 100644
--- a/components/camel-jms/src/main/docs/jms-component.adoc
+++ b/components/camel-jms/src/main/docs/jms-component.adoc
@@ -182,7 +182,7 @@ about these properties by consulting the relevant Spring documentation.
 
 
 // component options: START
-The JMS component supports 95 options, which are listed below.
+The JMS component supports 96 options, which are listed below.
 
 
 
@@ -246,6 +246,7 @@ The JMS component supports 95 options, which are listed below.
 | *allowAutoWiredConnection Factory* (advanced) | Whether to auto-discover ConnectionFactory from the registry, if no connection factory has been configured. If only one instance of ConnectionFactory is found then it will be used. This is enabled by default. | true | boolean
 | *allowAutoWiredDestination Resolver* (advanced) | Whether to auto-discover DestinationResolver from the registry, if no destination resolver has been configured. If only one instance of DestinationResolver is found then it will be used. This is enabled by default. | true | boolean
 | *allowSerializedHeaders* (advanced) | Controls whether or not to include serialized headers. Applies only when transferExchange is true. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. | false | boolean
+| *artemisStreamingEnabled* (advanced) | Whether optimizing for Apache Artemis streaming mode. | true | boolean
 | *asyncStartListener* (advanced) | Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, the [...]
 | *asyncStopListener* (advanced) | Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. | false | boolean
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
@@ -324,7 +325,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (93 parameters):
+=== Query Parameters (94 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -386,6 +387,7 @@ with the following path and query parameters:
 | *replyToDestinationSelectorName* (producer) | Sets the JMS Selector using the fixed name to be used so you can filter out your own replies from the others when using a shared queue (that is, if you are not using a temporary reply queue). |  | String
 | *streamMessageTypeEnabled* (producer) | Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls which kind will be used. By default BytesMessage is used which enforces the entire message payload to be read into memory. By enabling this option the message payload is read into memory in chunks and each chunk is then written to the StreamMessage until no [...]
 | *allowSerializedHeaders* (advanced) | Controls whether or not to include serialized headers. Applies only when transferExchange is true. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. | false | boolean
+| *artemisStreamingEnabled* (advanced) | Whether optimizing for Apache Artemis streaming mode. | true | boolean
 | *asyncStartListener* (advanced) | Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, the [...]
 | *asyncStopListener* (advanced) | Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. | false | boolean
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
index f1d1d77..4d0a907 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
@@ -245,7 +245,8 @@ public class JmsBinding {
 
     protected Object createByteArrayFromBytesMessage(Exchange exchange, BytesMessage message) throws JMSException {
         // ActiveMQ has special optimised mode for bytes message, so we should use streaming if possible
-        Long size = getSafeLongProperty(message, "_AMQ_LARGE_SIZE");
+        boolean artemis = endpoint != null && endpoint.isArtemisStreamingEnabled();
+        Long size = artemis ? getSafeLongProperty(message, "_AMQ_LARGE_SIZE") : null;
         if (size != null && size > 0) {
             LOG.trace("Optimised for Artemis: Reading from BytesMessage in streaming mode directly into CachedOutputStream payload");
             CachedOutputStream cos = new CachedOutputStream(exchange, true);
@@ -604,7 +605,7 @@ public class JmsBinding {
         }
 
         if (type == Stream) {
-            boolean artemis = isVendor(session, "Artemis");
+            boolean artemis = endpoint.isArtemisStreamingEnabled() && isVendor(session, "Artemis");
             if (artemis) {
                 // if running ActiveMQ Artemis then it has optimised streaming mode using byte messages so enforce as bytes
                 type = Bytes;
@@ -634,7 +635,7 @@ public class JmsBinding {
                 BytesMessage message = session.createBytesMessage();
                 if (body != null) {
                     try {
-                        if (isVendor(session, "Artemis")) {
+                        if (endpoint.isArtemisStreamingEnabled() && isVendor(session, "Artemis")) {
                             LOG.trace("Optimised for Artemis: Streaming payload in BytesMessage");
                             InputStream is = context.getTypeConverter().mandatoryConvertTo(InputStream.class, exchange, body);
                             message.setObjectProperty("JMS_AMQ_InputStream", is);
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
index 9bbe262..ba0e330 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
@@ -996,6 +996,14 @@ public class JmsComponent extends HeaderFilterStrategyComponent {
         configuration.setMessageCreatedStrategy(messageCreatedStrategy);
     }
 
+    public boolean isArtemisStreamingEnabled() {
+        return configuration.isArtemisStreamingEnabled();
+    }
+
+    public void setArtemisStreamingEnabled(boolean artemisStreamingEnabled) {
+        configuration.setArtemisStreamingEnabled(artemisStreamingEnabled);
+    }
+
     // Implementation methods
     // -------------------------------------------------------------------------
 
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
index e4898b8..589a2fd 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
@@ -451,6 +451,10 @@ public class JmsConfiguration implements Cloneable {
                     + " For example some message systems such as WMQ do this with header names using prefix JMS_IBM_MQMD_ containing values with byte array or other invalid types."
                     + " You can specify multiple header names separated by comma, and use * as suffix for wildcard matching.")
     private String allowAdditionalHeaders;
+    @UriParam(label = "producer", description = "Sets whether JMS date properties should be formatted according to the ISO 8601 standard.")
+    private boolean formatDateHeadersToIso8601;
+    @UriParam(defaultValue = "true", label = "advanced", description = "Whether optimizing for Apache Artemis streaming mode.")
+    private boolean artemisStreamingEnabled = true;
 
     // JMS 2.0 API
     @UriParam(label = "consumer", description = "Set the name of a subscription to create. To be applied in case"
@@ -480,16 +484,11 @@ public class JmsConfiguration implements Cloneable {
             + " therefore this method switches the pubSubDomain flag as well."
             + " Requires a JMS 2.0 compatible message broker.")
     private boolean subscriptionShared;
-
     @UriParam(label = "producer,advanced", description = "Sets whether StreamMessage type is enabled or not."
             + " Message payloads of streaming kind such as files, InputStream, etc will either by sent as BytesMessage or StreamMessage."
             + " This option controls which kind will be used. By default BytesMessage is used which enforces the entire message payload to be read into memory."
             + " By enabling this option the message payload is read into memory in chunks and each chunk is then written to the StreamMessage until no more data.")
     private boolean streamMessageTypeEnabled;
-
-    @UriParam(label = "producer", description = "Sets whether JMS date properties should be formatted according to the ISO 8601 standard.")
-    private boolean formatDateHeadersToIso8601;
-
     @UriParam(defaultValue = "-1", label = "producer", description = "Sets delivery delay to use for send calls for JMS. "
             + "This option requires JMS 2.0 compliant broker.")
     private long deliveryDelay = -1;
@@ -2208,4 +2207,14 @@ public class JmsConfiguration implements Cloneable {
         this.deliveryDelay = deliveryDelay;
     }
 
+    public boolean isArtemisStreamingEnabled() {
+        return artemisStreamingEnabled;
+    }
+
+    /**
+     * Whether optimizing for Apache Artemis streaming mode.
+     */
+    public void setArtemisStreamingEnabled(boolean artemisStreamingEnabled) {
+        this.artemisStreamingEnabled = artemisStreamingEnabled;
+    }
 }
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
index 665bc37..7713e94 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
@@ -1291,6 +1291,16 @@ public class JmsEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         configuration.setFormatDateHeadersToIso8601(formatDateHeadersToIso8601);
     }
 
+    @ManagedAttribute
+    public boolean isArtemisStreamingEnabled() {
+        return configuration.isArtemisStreamingEnabled();
+    }
+
+    @ManagedAttribute
+    public void setArtemisStreamingEnabled(boolean artemisStreamingEnabled) {
+        configuration.setArtemisStreamingEnabled(artemisStreamingEnabled);
+    }
+
     // Implementation methods
     //-------------------------------------------------------------------------
 
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JmsComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JmsComponentBuilderFactory.java
index b3b031e..b02d2a3 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JmsComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JmsComponentBuilderFactory.java
@@ -982,6 +982,19 @@ public interface JmsComponentBuilderFactory {
             return this;
         }
         /**
+         * Whether optimizing for Apache Artemis streaming mode.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: advanced
+         */
+        default JmsComponentBuilder artemisStreamingEnabled(
+                boolean artemisStreamingEnabled) {
+            doSetProperty("artemisStreamingEnabled", artemisStreamingEnabled);
+            return this;
+        }
+        /**
          * Whether to startup the JmsConsumer message listener asynchronously,
          * when starting a route. For example if a JmsConsumer cannot get a
          * connection to a remote JMS broker, then it may block while retrying
@@ -1639,6 +1652,7 @@ public interface JmsComponentBuilderFactory {
             case "allowAutoWiredConnectionFactory": ((JmsComponent) component).setAllowAutoWiredConnectionFactory((boolean) value); return true;
             case "allowAutoWiredDestinationResolver": ((JmsComponent) component).setAllowAutoWiredDestinationResolver((boolean) value); return true;
             case "allowSerializedHeaders": getOrCreateConfiguration((JmsComponent) component).setAllowSerializedHeaders((boolean) value); return true;
+            case "artemisStreamingEnabled": getOrCreateConfiguration((JmsComponent) component).setArtemisStreamingEnabled((boolean) value); return true;
             case "asyncStartListener": getOrCreateConfiguration((JmsComponent) component).setAsyncStartListener((boolean) value); return true;
             case "asyncStopListener": getOrCreateConfiguration((JmsComponent) component).setAsyncStopListener((boolean) value); return true;
             case "basicPropertyBinding": ((JmsComponent) component).setBasicPropertyBinding((boolean) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
index 0e79cc6..4e105eb 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
@@ -1061,6 +1061,32 @@ public interface JmsEndpointBuilderFactory {
             return this;
         }
         /**
+         * Whether optimizing for Apache Artemis streaming mode.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: advanced
+         */
+        default AdvancedJmsEndpointConsumerBuilder artemisStreamingEnabled(
+                boolean artemisStreamingEnabled) {
+            doSetProperty("artemisStreamingEnabled", artemisStreamingEnabled);
+            return this;
+        }
+        /**
+         * Whether optimizing for Apache Artemis streaming mode.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: advanced
+         */
+        default AdvancedJmsEndpointConsumerBuilder artemisStreamingEnabled(
+                String artemisStreamingEnabled) {
+            doSetProperty("artemisStreamingEnabled", artemisStreamingEnabled);
+            return this;
+        }
+        /**
          * Whether to startup the JmsConsumer message listener asynchronously,
          * when starting a route. For example if a JmsConsumer cannot get a
          * connection to a remote JMS broker, then it may block while retrying
@@ -3067,6 +3093,32 @@ public interface JmsEndpointBuilderFactory {
             return this;
         }
         /**
+         * Whether optimizing for Apache Artemis streaming mode.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: advanced
+         */
+        default AdvancedJmsEndpointProducerBuilder artemisStreamingEnabled(
+                boolean artemisStreamingEnabled) {
+            doSetProperty("artemisStreamingEnabled", artemisStreamingEnabled);
+            return this;
+        }
+        /**
+         * Whether optimizing for Apache Artemis streaming mode.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: advanced
+         */
+        default AdvancedJmsEndpointProducerBuilder artemisStreamingEnabled(
+                String artemisStreamingEnabled) {
+            doSetProperty("artemisStreamingEnabled", artemisStreamingEnabled);
+            return this;
+        }
+        /**
          * Whether to startup the JmsConsumer message listener asynchronously,
          * when starting a route. For example if a JmsConsumer cannot get a
          * connection to a remote JMS broker, then it may block while retrying
@@ -4341,6 +4393,32 @@ public interface JmsEndpointBuilderFactory {
             return this;
         }
         /**
+         * Whether optimizing for Apache Artemis streaming mode.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: advanced
+         */
+        default AdvancedJmsEndpointBuilder artemisStreamingEnabled(
+                boolean artemisStreamingEnabled) {
+            doSetProperty("artemisStreamingEnabled", artemisStreamingEnabled);
+            return this;
+        }
+        /**
+         * Whether optimizing for Apache Artemis streaming mode.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: advanced
+         */
+        default AdvancedJmsEndpointBuilder artemisStreamingEnabled(
+                String artemisStreamingEnabled) {
+            doSetProperty("artemisStreamingEnabled", artemisStreamingEnabled);
+            return this;
+        }
+        /**
          * Whether to startup the JmsConsumer message listener asynchronously,
          * when starting a route. For example if a JmsConsumer cannot get a
          * connection to a remote JMS broker, then it may block while retrying
diff --git a/docs/components/modules/ROOT/pages/jms-component.adoc b/docs/components/modules/ROOT/pages/jms-component.adoc
index bfce109..be597fa 100644
--- a/docs/components/modules/ROOT/pages/jms-component.adoc
+++ b/docs/components/modules/ROOT/pages/jms-component.adoc
@@ -183,7 +183,7 @@ about these properties by consulting the relevant Spring documentation.
 
 
 // component options: START
-The JMS component supports 95 options, which are listed below.
+The JMS component supports 96 options, which are listed below.
 
 
 
@@ -247,6 +247,7 @@ The JMS component supports 95 options, which are listed below.
 | *allowAutoWiredConnection Factory* (advanced) | Whether to auto-discover ConnectionFactory from the registry, if no connection factory has been configured. If only one instance of ConnectionFactory is found then it will be used. This is enabled by default. | true | boolean
 | *allowAutoWiredDestination Resolver* (advanced) | Whether to auto-discover DestinationResolver from the registry, if no destination resolver has been configured. If only one instance of DestinationResolver is found then it will be used. This is enabled by default. | true | boolean
 | *allowSerializedHeaders* (advanced) | Controls whether or not to include serialized headers. Applies only when transferExchange is true. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. | false | boolean
+| *artemisStreamingEnabled* (advanced) | Whether optimizing for Apache Artemis streaming mode. | true | boolean
 | *asyncStartListener* (advanced) | Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, the [...]
 | *asyncStopListener* (advanced) | Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. | false | boolean
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
@@ -325,7 +326,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (93 parameters):
+=== Query Parameters (94 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -387,6 +388,7 @@ with the following path and query parameters:
 | *replyToDestinationSelectorName* (producer) | Sets the JMS Selector using the fixed name to be used so you can filter out your own replies from the others when using a shared queue (that is, if you are not using a temporary reply queue). |  | String
 | *streamMessageTypeEnabled* (producer) | Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls which kind will be used. By default BytesMessage is used which enforces the entire message payload to be read into memory. By enabling this option the message payload is read into memory in chunks and each chunk is then written to the StreamMessage until no [...]
 | *allowSerializedHeaders* (advanced) | Controls whether or not to include serialized headers. Applies only when transferExchange is true. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. | false | boolean
+| *artemisStreamingEnabled* (advanced) | Whether optimizing for Apache Artemis streaming mode. | true | boolean
 | *asyncStartListener* (advanced) | Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, the [...]
 | *asyncStopListener* (advanced) | Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. | false | boolean
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean