You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2019/08/11 13:41:36 UTC

[camel] branch master updated (5b408b9 -> 4c2f7fb)

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

janbednar pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 5b408b9  Fixed CS for Camel-Twitter
     new ab08e6e  CAMEL-13786: add delivery delay to jms component
     new dd29fb0  CAMEL-13786: regen
     new 4c2f7fb  CAMEL-13786: Integration test for JMS 2.0 deliveryDelay

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/docs/activemq-component.adoc          |  3 +-
 .../camel-amqp/src/main/docs/amqp-component.adoc   |  3 +-
 .../camel-jms/src/main/docs/jms-component.adoc     |  6 ++-
 .../camel/component/jms/JmsConfiguration.java      | 32 +++++++++---
 .../endpoint/dsl/AMQPEndpointBuilderFactory.java   | 24 +++++++++
 .../dsl/ActiveMQEndpointBuilderFactory.java        | 25 ++++++++++
 .../endpoint/dsl/JmsEndpointBuilderFactory.java    | 24 +++++++++
 .../modules/ROOT/pages/activemq-component.adoc     |  3 +-
 .../modules/ROOT/pages/amqp-component.adoc         |  3 +-
 .../modules/ROOT/pages/jms-component.adoc          |  6 ++-
 .../jms/springboot/JmsComponentConfiguration.java  | 13 +++++
 .../camel/itest/jms2/Jms2DeliveryDelayTest.java    | 58 +++++++++++-----------
 12 files changed, 155 insertions(+), 45 deletions(-)
 copy core/camel-core/src/test/java/org/apache/camel/processor/OnCompletionWhenTest.java => tests/camel-itest-jms2/src/test/java/org/apache/camel/itest/jms2/Jms2DeliveryDelayTest.java (51%)


[camel] 01/03: CAMEL-13786: add delivery delay to jms component

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janbednar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ab08e6e4c82aada0546f5a24bcfa1bc0c9b7137e
Author: mahdikarami77 <ma...@ut.ac.ir>
AuthorDate: Thu Aug 1 23:49:17 2019 +0430

    CAMEL-13786: add delivery delay to jms component
---
 .../src/main/docs/activemq-component.adoc          |  3 +-
 .../camel-amqp/src/main/docs/amqp-component.adoc   |  3 +-
 .../camel-jms/src/main/docs/jms-component.adoc     |  3 +-
 .../camel/component/jms/JmsConfiguration.java      | 32 +++++++++++++++++-----
 .../endpoint/dsl/AMQPEndpointBuilderFactory.java   | 22 +++++++++++++++
 .../dsl/ActiveMQEndpointBuilderFactory.java        | 23 ++++++++++++++++
 .../endpoint/dsl/JmsEndpointBuilderFactory.java    | 22 +++++++++++++++
 .../jms/springboot/JmsComponentConfiguration.java  | 12 ++++++++
 8 files changed, 110 insertions(+), 10 deletions(-)

diff --git a/components/camel-activemq/src/main/docs/activemq-component.adoc b/components/camel-activemq/src/main/docs/activemq-component.adoc
index 9fd81ea..b251fd6 100644
--- a/components/camel-activemq/src/main/docs/activemq-component.adoc
+++ b/components/camel-activemq/src/main/docs/activemq-component.adoc
@@ -162,7 +162,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (92 parameters):
+=== Query Parameters (93 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -198,6 +198,7 @@ with the following path and query parameters:
 | *exposeListenerSession* (consumer) | Specifies whether the listener session should be exposed when consuming messages. | false | boolean
 | *replyToSameDestination Allowed* (consumer) | Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. | false | boolean
 | *taskExecutor* (consumer) | Allows you to specify a custom task executor for consuming messages. |  | TaskExecutor
+| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. | -1 | long
 | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean
 | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. | false | Boolean
diff --git a/components/camel-amqp/src/main/docs/amqp-component.adoc b/components/camel-amqp/src/main/docs/amqp-component.adoc
index 5a973ef..6f00c4f 100644
--- a/components/camel-amqp/src/main/docs/amqp-component.adoc
+++ b/components/camel-amqp/src/main/docs/amqp-component.adoc
@@ -152,7 +152,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (92 parameters):
+=== Query Parameters (93 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -188,6 +188,7 @@ with the following path and query parameters:
 | *exposeListenerSession* (consumer) | Specifies whether the listener session should be exposed when consuming messages. | false | boolean
 | *replyToSameDestination Allowed* (consumer) | Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. | false | boolean
 | *taskExecutor* (consumer) | Allows you to specify a custom task executor for consuming messages. |  | TaskExecutor
+| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. | -1 | long
 | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean
 | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. | false | Boolean
diff --git a/components/camel-jms/src/main/docs/jms-component.adoc b/components/camel-jms/src/main/docs/jms-component.adoc
index 7be325d..405d99f 100644
--- a/components/camel-jms/src/main/docs/jms-component.adoc
+++ b/components/camel-jms/src/main/docs/jms-component.adoc
@@ -319,7 +319,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (92 parameters):
+=== Query Parameters (93 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -355,6 +355,7 @@ with the following path and query parameters:
 | *exposeListenerSession* (consumer) | Specifies whether the listener session should be exposed when consuming messages. | false | boolean
 | *replyToSameDestination Allowed* (consumer) | Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. | false | boolean
 | *taskExecutor* (consumer) | Allows you to specify a custom task executor for consuming messages. |  | TaskExecutor
+| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. | -1 | long
 | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean
 | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. | false | Boolean
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 47ec84c..37cc482 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
@@ -110,14 +110,14 @@ public class JmsConfiguration implements Cloneable {
                     + " the DefaultMessageListenerContainer.runningAllowed flag to quick stop in case JmsConfiguration#isAcceptMessagesWhileStopping"
                     + " is enabled, and org.apache.camel.CamelContext is currently being stopped. This quick stop ability is enabled by"
                     + " default in the regular JMS consumers but to enable for reply managers you must enable this flag.")
-    private boolean allowReplyManagerQuickStop;   
+    private boolean allowReplyManagerQuickStop;
     @UriParam(label = "consumer,advanced",
             description = "Specifies whether the consumer accept messages while it is stopping."
                     + " You may consider enabling this option, if you start and stop JMS routes at runtime, while there are still messages"
                     + " enqueued on the queue. If this option is false, and you stop the JMS route, then messages may be rejected,"
                     + " and the JMS broker would have to attempt redeliveries, which yet again may be rejected, and eventually the message"
                     + " may be moved at a dead letter queue on the JMS broker. To avoid this its recommended to enable this option.")
-    private boolean acceptMessagesWhileStopping;    
+    private boolean acceptMessagesWhileStopping;
     @UriParam(description = "Sets the JMS client ID to use. Note that this value, if specified, must be unique and can only be used by a single JMS connection instance."
             + " It is typically only required for durable topic subscriptions."
             + " If using Apache ActiveMQ you may prefer to use Virtual Topics instead.")
@@ -232,7 +232,7 @@ public class JmsConfiguration implements Cloneable {
             description = "Specifies whether Camel should auto map the received JMS message to a suited payload type, such as javax.jms.TextMessage to a String etc.")
     private boolean mapJmsMessage = true;
     @UriParam(defaultValue = "true", label = "advanced",
-            description = "When sending, specifies whether message IDs should be added. This is just an hint to the JMS broker." 
+            description = "When sending, specifies whether message IDs should be added. This is just an hint to the JMS broker."
                     + " If the JMS provider accepts this hint, these messages must have the message ID set to null; if the provider ignores the hint, "
                     + "the message ID must be set to its normal unique value.")
     private boolean messageIdEnabled = true;
@@ -484,6 +484,10 @@ public class JmsConfiguration implements Cloneable {
     @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;
+
     public JmsConfiguration() {
     }
 
@@ -717,6 +721,9 @@ public class JmsConfiguration implements Cloneable {
                 template.setSessionAcknowledgeModeName(acknowledgementModeName);
             }
         }
+
+        template.setDeliveryDelay(deliveryDelay);
+
         return template;
     }
 
@@ -863,7 +870,7 @@ public class JmsConfiguration implements Cloneable {
     }
 
     /**
-     * Whether the {@link DefaultMessageListenerContainer} used in the reply managers for request-reply messaging allow 
+     * Whether the {@link DefaultMessageListenerContainer} used in the reply managers for request-reply messaging allow
      * the {@link DefaultMessageListenerContainer#runningAllowed()} flag to quick stop in case {@link JmsConfiguration#isAcceptMessagesWhileStopping()}
      * is enabled, and {@link org.apache.camel.CamelContext} is currently being stopped. This quick stop ability is enabled by
      * default in the regular JMS consumers but to enable for reply managers you must enable this flag.
@@ -875,7 +882,7 @@ public class JmsConfiguration implements Cloneable {
     public void setAllowReplyManagerQuickStop(boolean allowReplyManagerQuickStop) {
         this.allowReplyManagerQuickStop = allowReplyManagerQuickStop;
     }
-    
+
     public String getClientId() {
         return clientId;
     }
@@ -1163,7 +1170,7 @@ public class JmsConfiguration implements Cloneable {
     public void setWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime(long sleepingTime) {
         this.waitForProvisionCorrelationToBeUpdatedThreadSleepingTime = sleepingTime;
     }
-    
+
     public int getMaxConcurrentConsumers() {
         return maxConcurrentConsumers;
     }
@@ -2056,7 +2063,7 @@ public class JmsConfiguration implements Cloneable {
 
     /**
      * Use this JMS property to correlate messages in InOut exchange pattern (request-reply)
-     * instead of JMSCorrelationID property. This allows you to exchange messages with 
+     * instead of JMSCorrelationID property. This allows you to exchange messages with
      * systems that do not correlate messages using JMSCorrelationID JMS property. If used
      * JMSCorrelationID will not be used or set by Camel. The value of here named property
      * will be generated if not supplied in the header of the message under the same name.
@@ -2166,4 +2173,15 @@ public class JmsConfiguration implements Cloneable {
         this.formatDateHeadersToIso8601 = formatDateHeadersToIso8601;
     }
 
+    public long getDeliveryDelay() {
+        return deliveryDelay;
+    }
+
+    /**
+     * Sets delivery delay to use for send calls for JMS.
+     */
+    public void setDeliveryDelay(long deliveryDelay) {
+        this.deliveryDelay = deliveryDelay;
+    }
+
 }
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java
index 4700246..a238d9e 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java
@@ -2186,6 +2186,28 @@ public interface AMQPEndpointBuilderFactory {
             return this;
         }
         /**
+         * Sets delivery delay to use for send calls for JMS.
+         * 
+         * The option is a: <code>long</code> type.
+         * 
+         * Group: producer
+         */
+        default AMQPEndpointProducerBuilder deliveryDelay(long deliveryDelay) {
+            setProperty("deliveryDelay", deliveryDelay);
+            return this;
+        }
+        /**
+         * Sets delivery delay to use for send calls for JMS.
+         * 
+         * The option will be converted to a <code>long</code> type.
+         * 
+         * Group: producer
+         */
+        default AMQPEndpointProducerBuilder deliveryDelay(String deliveryDelay) {
+            setProperty("deliveryDelay", deliveryDelay);
+            return this;
+        }
+        /**
          * Specifies the delivery mode to be used. Possibles values are those
          * defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT
          * = 2.
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
index 5205408..ea56460 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
@@ -2194,6 +2194,29 @@ public interface ActiveMQEndpointBuilderFactory {
             return this;
         }
         /**
+         * Sets delivery delay to use for send calls for JMS.
+         * 
+         * The option is a: <code>long</code> type.
+         * 
+         * Group: producer
+         */
+        default ActiveMQEndpointProducerBuilder deliveryDelay(long deliveryDelay) {
+            setProperty("deliveryDelay", deliveryDelay);
+            return this;
+        }
+        /**
+         * Sets delivery delay to use for send calls for JMS.
+         * 
+         * The option will be converted to a <code>long</code> type.
+         * 
+         * Group: producer
+         */
+        default ActiveMQEndpointProducerBuilder deliveryDelay(
+                String deliveryDelay) {
+            setProperty("deliveryDelay", deliveryDelay);
+            return this;
+        }
+        /**
          * Specifies the delivery mode to be used. Possibles values are those
          * defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT
          * = 2.
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
index ffd9ad2..c6c4d58 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
@@ -2185,6 +2185,28 @@ public interface JmsEndpointBuilderFactory {
             return this;
         }
         /**
+         * Sets delivery delay to use for send calls for JMS.
+         * 
+         * The option is a: <code>long</code> type.
+         * 
+         * Group: producer
+         */
+        default JmsEndpointProducerBuilder deliveryDelay(long deliveryDelay) {
+            setProperty("deliveryDelay", deliveryDelay);
+            return this;
+        }
+        /**
+         * Sets delivery delay to use for send calls for JMS.
+         * 
+         * The option will be converted to a <code>long</code> type.
+         * 
+         * Group: producer
+         */
+        default JmsEndpointProducerBuilder deliveryDelay(String deliveryDelay) {
+            setProperty("deliveryDelay", deliveryDelay);
+            return this;
+        }
+        /**
          * Specifies the delivery mode to be used. Possibles values are those
          * defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT
          * = 2.
diff --git a/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
index 52c0d11..8df7569 100644
--- a/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
@@ -1944,6 +1944,10 @@ public class JmsComponentConfiguration
          * 8601 standard.
          */
         private Boolean formatDateHeadersToIso8601 = false;
+        /**
+         * Sets delivery delay to use for send calls for JMS.
+         */
+        private Long deliveryDelay = -1L;
 
         public ConsumerType getConsumerType() {
             return consumerType;
@@ -2680,5 +2684,13 @@ public class JmsComponentConfiguration
                 Boolean formatDateHeadersToIso8601) {
             this.formatDateHeadersToIso8601 = formatDateHeadersToIso8601;
         }
+
+        public Long getDeliveryDelay() {
+            return deliveryDelay;
+        }
+
+        public void setDeliveryDelay(Long deliveryDelay) {
+            this.deliveryDelay = deliveryDelay;
+        }
     }
 }
\ No newline at end of file


[camel] 03/03: CAMEL-13786: Integration test for JMS 2.0 deliveryDelay

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janbednar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4c2f7fb0131d636b8a2182aeda6f3359a8a7a2f8
Author: Jan Bednář <ma...@janbednar.eu>
AuthorDate: Sun Aug 11 13:16:18 2019 +0200

    CAMEL-13786: Integration test for JMS 2.0 deliveryDelay
---
 .../camel/itest/jms2/Jms2DeliveryDelayTest.java    | 72 ++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/tests/camel-itest-jms2/src/test/java/org/apache/camel/itest/jms2/Jms2DeliveryDelayTest.java b/tests/camel-itest-jms2/src/test/java/org/apache/camel/itest/jms2/Jms2DeliveryDelayTest.java
new file mode 100644
index 0000000..0436b24
--- /dev/null
+++ b/tests/camel-itest-jms2/src/test/java/org/apache/camel/itest/jms2/Jms2DeliveryDelayTest.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.jms2;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class Jms2DeliveryDelayTest extends BaseJms2TestSupport {
+
+    @Test
+    public void testInOnlyWithDelay() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedBodiesReceived("Hello World");
+
+        long start = System.currentTimeMillis();
+        template.sendBody("jms:topic:foo?deliveryDelay=1000", "Hello World");
+        assertMockEndpointsSatisfied();
+        Assert.assertTrue("Should take at least 1000 millis", System.currentTimeMillis() - start >= 1000);
+    }
+
+    @Test
+    public void testInOnlyWithoutDelay() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedBodiesReceived("Hello World");
+
+        long start = System.currentTimeMillis();
+        template.sendBody("jms:topic:foo", "Hello World");
+        assertMockEndpointsSatisfied();
+        Assert.assertTrue("Should take less than 1000 millis", System.currentTimeMillis() - start < 1000);
+    }
+
+    @Test
+    public void testInOutWithDelay() throws Exception {
+        long start = System.currentTimeMillis();
+        template.requestBody("jms:topic:foo?deliveryDelay=1000", "Hello World");
+        Assert.assertTrue("Should take at least 1000 millis", System.currentTimeMillis() - start >= 1000);
+    }
+
+    @Test
+    public void testInOutWithoutDelay() throws Exception {
+        long start = System.currentTimeMillis();
+        template.requestBody("jms:topic:foo", "Hello World");
+        Assert.assertTrue("Should take less than 1000 millis", System.currentTimeMillis() - start < 1000);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("jms:topic:foo")
+                    .to("mock:result");
+            }
+        };
+    }
+}


[camel] 02/03: CAMEL-13786: regen

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janbednar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit dd29fb0e16e133685b29760e37fc49f41601b361
Author: Jan Bednář <ma...@janbednar.eu>
AuthorDate: Sat Aug 10 18:22:22 2019 +0200

    CAMEL-13786: regen
---
 components/camel-activemq/src/main/docs/activemq-component.adoc     | 2 +-
 components/camel-amqp/src/main/docs/amqp-component.adoc             | 2 +-
 components/camel-jms/src/main/docs/jms-component.adoc               | 5 +++--
 .../main/java/org/apache/camel/component/jms/JmsConfiguration.java  | 2 +-
 .../camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java      | 6 ++++--
 .../camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java  | 6 ++++--
 .../camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java       | 6 ++++--
 docs/components/modules/ROOT/pages/activemq-component.adoc          | 3 ++-
 docs/components/modules/ROOT/pages/amqp-component.adoc              | 3 ++-
 docs/components/modules/ROOT/pages/jms-component.adoc               | 6 ++++--
 .../camel/component/jms/springboot/JmsComponentConfiguration.java   | 3 ++-
 11 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/components/camel-activemq/src/main/docs/activemq-component.adoc b/components/camel-activemq/src/main/docs/activemq-component.adoc
index b251fd6..ac45242 100644
--- a/components/camel-activemq/src/main/docs/activemq-component.adoc
+++ b/components/camel-activemq/src/main/docs/activemq-component.adoc
@@ -198,7 +198,7 @@ with the following path and query parameters:
 | *exposeListenerSession* (consumer) | Specifies whether the listener session should be exposed when consuming messages. | false | boolean
 | *replyToSameDestination Allowed* (consumer) | Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. | false | boolean
 | *taskExecutor* (consumer) | Allows you to specify a custom task executor for consuming messages. |  | TaskExecutor
-| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. | -1 | long
+| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant broker. | -1 | long
 | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean
 | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. | false | Boolean
diff --git a/components/camel-amqp/src/main/docs/amqp-component.adoc b/components/camel-amqp/src/main/docs/amqp-component.adoc
index 6f00c4f..15b7dfc 100644
--- a/components/camel-amqp/src/main/docs/amqp-component.adoc
+++ b/components/camel-amqp/src/main/docs/amqp-component.adoc
@@ -188,7 +188,7 @@ with the following path and query parameters:
 | *exposeListenerSession* (consumer) | Specifies whether the listener session should be exposed when consuming messages. | false | boolean
 | *replyToSameDestination Allowed* (consumer) | Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. | false | boolean
 | *taskExecutor* (consumer) | Allows you to specify a custom task executor for consuming messages. |  | TaskExecutor
-| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. | -1 | long
+| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant broker. | -1 | long
 | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean
 | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. | false | Boolean
diff --git a/components/camel-jms/src/main/docs/jms-component.adoc b/components/camel-jms/src/main/docs/jms-component.adoc
index 405d99f..3e1b79a 100644
--- a/components/camel-jms/src/main/docs/jms-component.adoc
+++ b/components/camel-jms/src/main/docs/jms-component.adoc
@@ -355,7 +355,7 @@ with the following path and query parameters:
 | *exposeListenerSession* (consumer) | Specifies whether the listener session should be exposed when consuming messages. | false | boolean
 | *replyToSameDestination Allowed* (consumer) | Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. | false | boolean
 | *taskExecutor* (consumer) | Allows you to specify a custom task executor for consuming messages. |  | TaskExecutor
-| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. | -1 | long
+| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant broker. | -1 | long
 | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean
 | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. | false | Boolean
@@ -436,7 +436,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 169 options, which are listed below.
+The component supports 170 options, which are listed below.
 
 
 
@@ -479,6 +479,7 @@ The component supports 169 options, which are listed below.
 | *camel.component.jms.configuration.consumer-type* | The consumer type to use, which can be one of: Simple, Default, or Custom. The consumer type determines which Spring JMS listener to use. Default will use org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the MessageListenerContainerFactory defined by the messageListenerContainerFactory option will determine what  [...]
 | *camel.component.jms.configuration.correlation-property* | Use this JMS property to correlate messages in InOut exchange pattern (request-reply) instead of JMSCorrelationID property. This allows you to exchange messages with systems that do not correlate messages using JMSCorrelationID JMS property. If used JMSCorrelationID will not be used or set by Camel. The value of here named property will be generated if not supplied in the header of the message under the same name. |  | String
 | *camel.component.jms.configuration.default-task-executor-type* | Specifies what default TaskExecutor type to use in the DefaultMessageListenerContainer, for both consumer endpoints and the ReplyTo consumer of producer endpoints. Possible values: SimpleAsync (uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's ThreadPoolTaskExecutor with optimal values - cached threadpool-like). If not set, it defaults to the previous behaviour, which uses a cached thread pool for consum [...]
+| *camel.component.jms.configuration.delivery-delay* | Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant broker. | -1 | Long
 | *camel.component.jms.configuration.delivery-mode* | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *camel.component.jms.configuration.delivery-persistent* | Specifies whether persistent delivery is used by default. | true | Boolean
 | *camel.component.jms.configuration.destination-resolver* | A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to use your own resolver (for example, to lookup the real destination in a JNDI registry). |  | DestinationResolver
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 37cc482..7109b35 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
@@ -2178,7 +2178,7 @@ public class JmsConfiguration implements Cloneable {
     }
 
     /**
-     * Sets delivery delay to use for send calls for JMS.
+     * Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant broker.
      */
     public void setDeliveryDelay(long deliveryDelay) {
         this.deliveryDelay = deliveryDelay;
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java
index a238d9e..5f64924 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java
@@ -2186,7 +2186,8 @@ public interface AMQPEndpointBuilderFactory {
             return this;
         }
         /**
-         * Sets delivery delay to use for send calls for JMS.
+         * Sets delivery delay to use for send calls for JMS. This option
+         * requires JMS 2.0 compliant broker.
          * 
          * The option is a: <code>long</code> type.
          * 
@@ -2197,7 +2198,8 @@ public interface AMQPEndpointBuilderFactory {
             return this;
         }
         /**
-         * Sets delivery delay to use for send calls for JMS.
+         * Sets delivery delay to use for send calls for JMS. This option
+         * requires JMS 2.0 compliant broker.
          * 
          * The option will be converted to a <code>long</code> type.
          * 
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
index ea56460..6110212 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
@@ -2194,7 +2194,8 @@ public interface ActiveMQEndpointBuilderFactory {
             return this;
         }
         /**
-         * Sets delivery delay to use for send calls for JMS.
+         * Sets delivery delay to use for send calls for JMS. This option
+         * requires JMS 2.0 compliant broker.
          * 
          * The option is a: <code>long</code> type.
          * 
@@ -2205,7 +2206,8 @@ public interface ActiveMQEndpointBuilderFactory {
             return this;
         }
         /**
-         * Sets delivery delay to use for send calls for JMS.
+         * Sets delivery delay to use for send calls for JMS. This option
+         * requires JMS 2.0 compliant broker.
          * 
          * The option will be converted to a <code>long</code> type.
          * 
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
index c6c4d58..82623f5 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
@@ -2185,7 +2185,8 @@ public interface JmsEndpointBuilderFactory {
             return this;
         }
         /**
-         * Sets delivery delay to use for send calls for JMS.
+         * Sets delivery delay to use for send calls for JMS. This option
+         * requires JMS 2.0 compliant broker.
          * 
          * The option is a: <code>long</code> type.
          * 
@@ -2196,7 +2197,8 @@ public interface JmsEndpointBuilderFactory {
             return this;
         }
         /**
-         * Sets delivery delay to use for send calls for JMS.
+         * Sets delivery delay to use for send calls for JMS. This option
+         * requires JMS 2.0 compliant broker.
          * 
          * The option will be converted to a <code>long</code> type.
          * 
diff --git a/docs/components/modules/ROOT/pages/activemq-component.adoc b/docs/components/modules/ROOT/pages/activemq-component.adoc
index 9fd81ea..ac45242 100644
--- a/docs/components/modules/ROOT/pages/activemq-component.adoc
+++ b/docs/components/modules/ROOT/pages/activemq-component.adoc
@@ -162,7 +162,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (92 parameters):
+=== Query Parameters (93 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -198,6 +198,7 @@ with the following path and query parameters:
 | *exposeListenerSession* (consumer) | Specifies whether the listener session should be exposed when consuming messages. | false | boolean
 | *replyToSameDestination Allowed* (consumer) | Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. | false | boolean
 | *taskExecutor* (consumer) | Allows you to specify a custom task executor for consuming messages. |  | TaskExecutor
+| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant broker. | -1 | long
 | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean
 | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. | false | Boolean
diff --git a/docs/components/modules/ROOT/pages/amqp-component.adoc b/docs/components/modules/ROOT/pages/amqp-component.adoc
index 5a973ef..15b7dfc 100644
--- a/docs/components/modules/ROOT/pages/amqp-component.adoc
+++ b/docs/components/modules/ROOT/pages/amqp-component.adoc
@@ -152,7 +152,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (92 parameters):
+=== Query Parameters (93 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -188,6 +188,7 @@ with the following path and query parameters:
 | *exposeListenerSession* (consumer) | Specifies whether the listener session should be exposed when consuming messages. | false | boolean
 | *replyToSameDestination Allowed* (consumer) | Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. | false | boolean
 | *taskExecutor* (consumer) | Allows you to specify a custom task executor for consuming messages. |  | TaskExecutor
+| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant broker. | -1 | long
 | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean
 | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. | false | Boolean
diff --git a/docs/components/modules/ROOT/pages/jms-component.adoc b/docs/components/modules/ROOT/pages/jms-component.adoc
index 7be325d..3e1b79a 100644
--- a/docs/components/modules/ROOT/pages/jms-component.adoc
+++ b/docs/components/modules/ROOT/pages/jms-component.adoc
@@ -319,7 +319,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (92 parameters):
+=== Query Parameters (93 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -355,6 +355,7 @@ with the following path and query parameters:
 | *exposeListenerSession* (consumer) | Specifies whether the listener session should be exposed when consuming messages. | false | boolean
 | *replyToSameDestination Allowed* (consumer) | Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. | false | boolean
 | *taskExecutor* (consumer) | Allows you to specify a custom task executor for consuming messages. |  | TaskExecutor
+| *deliveryDelay* (producer) | Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant broker. | -1 | long
 | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean
 | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. | false | Boolean
@@ -435,7 +436,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 169 options, which are listed below.
+The component supports 170 options, which are listed below.
 
 
 
@@ -478,6 +479,7 @@ The component supports 169 options, which are listed below.
 | *camel.component.jms.configuration.consumer-type* | The consumer type to use, which can be one of: Simple, Default, or Custom. The consumer type determines which Spring JMS listener to use. Default will use org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the MessageListenerContainerFactory defined by the messageListenerContainerFactory option will determine what  [...]
 | *camel.component.jms.configuration.correlation-property* | Use this JMS property to correlate messages in InOut exchange pattern (request-reply) instead of JMSCorrelationID property. This allows you to exchange messages with systems that do not correlate messages using JMSCorrelationID JMS property. If used JMSCorrelationID will not be used or set by Camel. The value of here named property will be generated if not supplied in the header of the message under the same name. |  | String
 | *camel.component.jms.configuration.default-task-executor-type* | Specifies what default TaskExecutor type to use in the DefaultMessageListenerContainer, for both consumer endpoints and the ReplyTo consumer of producer endpoints. Possible values: SimpleAsync (uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's ThreadPoolTaskExecutor with optimal values - cached threadpool-like). If not set, it defaults to the previous behaviour, which uses a cached thread pool for consum [...]
+| *camel.component.jms.configuration.delivery-delay* | Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant broker. | -1 | Long
 | *camel.component.jms.configuration.delivery-mode* | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. |  | Integer
 | *camel.component.jms.configuration.delivery-persistent* | Specifies whether persistent delivery is used by default. | true | Boolean
 | *camel.component.jms.configuration.destination-resolver* | A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to use your own resolver (for example, to lookup the real destination in a JNDI registry). |  | DestinationResolver
diff --git a/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
index 8df7569..64e4415 100644
--- a/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
@@ -1945,7 +1945,8 @@ public class JmsComponentConfiguration
          */
         private Boolean formatDateHeadersToIso8601 = false;
         /**
-         * Sets delivery delay to use for send calls for JMS.
+         * Sets delivery delay to use for send calls for JMS. This option
+         * requires JMS 2.0 compliant broker.
          */
         private Long deliveryDelay = -1L;