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 2023/06/18 08:12:26 UTC

[camel] branch camel-3.x updated (c7a61e7f436 -> 30e1db9b8cf)

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

davsclaus pushed a change to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git


    from c7a61e7f436 CAMEL-19458: Upgrade to bouncycastle 1.74
     new 6d0aaec7e91 CAMEL-19373: camel-spring-rabbitmq - Fix reply timeout (#10422)
     new 30e1db9b8cf CAMEL-19373: camel-spring-rabbitmq - Fix reply timeout (#10422)

The 2 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:
 .../camel/component/springrabbit/spring-rabbitmq.json      |  2 +-
 .../component/springrabbit/SpringRabbitMQEndpoint.java     | 14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)


[camel] 02/02: CAMEL-19373: camel-spring-rabbitmq - Fix reply timeout (#10422)

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

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

commit 30e1db9b8cfe91c2cc0bb666d956db8ae75036ce
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Jun 18 10:07:02 2023 +0200

    CAMEL-19373: camel-spring-rabbitmq - Fix reply timeout (#10422)
---
 .../org/apache/camel/component/springrabbit/spring-rabbitmq.json | 2 +-
 .../camel/component/springrabbit/SpringRabbitMQEndpoint.java     | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/components/camel-spring-rabbitmq/src/generated/resources/org/apache/camel/component/springrabbit/spring-rabbitmq.json b/components/camel-spring-rabbitmq/src/generated/resources/org/apache/camel/component/springrabbit/spring-rabbitmq.json
index 44631fc3298..dc96552225d 100644
--- a/components/camel-spring-rabbitmq/src/generated/resources/org/apache/camel/component/springrabbit/spring-rabbitmq.json
+++ b/components/camel-spring-rabbitmq/src/generated/resources/org/apache/camel/component/springrabbit/spring-rabbitmq.json
@@ -88,7 +88,7 @@
     "retry": { "kind": "parameter", "displayName": "Retry", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.springframework.retry.interceptor.RetryOperationsInterceptor", "deprecated": false, "autowired": false, "secret": false, "description": "Custom retry configuration to use. If this is configured then the other settings such as maximumRetryAttempts for retry are not in use." },
     "confirm": { "kind": "parameter", "displayName": "Confirm", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "auto", "enabled", "disabled" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "auto", "description": "Controls whether to wait for confirms. The connection factory must be configured for publisher confirms and this method. auto = Camel detects if the connection factory uses con [...]
     "confirmTimeout": { "kind": "parameter", "displayName": "Confirm Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5000", "description": "Specify the timeout in milliseconds to be used when waiting for a message sent to be confirmed by RabbitMQ when doing send only messaging (InOnly). The default value is 5 seconds. A negative value indicates an inde [...]
-    "replyTimeout": { "kind": "parameter", "displayName": "Reply Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5000", "description": "Specify the timeout in milliseconds to be used when waiting for a reply message when doing request\/reply (InOut) messaging. The default value is 5 seconds. A negative value indicates an indefinite timeout." },
+    "replyTimeout": { "kind": "parameter", "displayName": "Reply Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "description": "Specify the timeout in milliseconds to be used when waiting for a reply message when doing request\/reply (InOut) messaging. The default value is 30 seconds. A negative value indicates an indefinite timeout (Beware th [...]
     "usePublisherConnection": { "kind": "parameter", "displayName": "Use Publisher Connection", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Use a separate connection for publishers and consumers" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "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 other [...]
     "args": { "kind": "parameter", "displayName": "Args", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "arg.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "description": "Specify arguments for configuring the different RabbitMQ concepts, a different prefix is required for each element: arg.consumer. arg.exchange. arg.queue. arg.binding. arg.dlq.ex [...]
diff --git a/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQEndpoint.java b/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQEndpoint.java
index 4c7cadf9611..0f28daa6a68 100644
--- a/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQEndpoint.java
+++ b/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQEndpoint.java
@@ -146,10 +146,10 @@ public class SpringRabbitMQEndpoint extends DefaultEndpoint implements AsyncEndp
                             + " handles the reply message. You can also use this option if you want to use Camel as a proxy between different"
                             + " message brokers and you want to route message from one system to another.")
     private boolean disableReplyTo;
-    @UriParam(label = "producer", javaType = "java.time.Duration", defaultValue = "5000",
-              description = "Specify the timeout in milliseconds to be used when waiting for a reply message when doing request/reply (InOut) messaging."
-                            + " The default value is 5 seconds. A negative value indicates an indefinite timeout.")
-    private long replyTimeout = 5000;
+    @UriParam(label = "producer", javaType = "java.time.Duration", defaultValue = "30000",
+            description = "Specify the timeout in milliseconds to be used when waiting for a reply message when doing request/reply (InOut) messaging."
+                          + " The default value is 30 seconds. A negative value indicates an indefinite timeout (Beware that this will cause a memory leak if a reply is not received).")
+    private long replyTimeout = 30000;
     @UriParam(label = "producer", javaType = "java.time.Duration", defaultValue = "5000",
               description = "Specify the timeout in milliseconds to be used when waiting for a message sent to be confirmed by RabbitMQ when doing send only messaging (InOnly)."
                             + " The default value is 5 seconds. A negative value indicates an indefinite timeout.")
@@ -552,6 +552,7 @@ public class SpringRabbitMQEndpoint extends DefaultEndpoint implements AsyncEndp
         template.setRoutingKey(routingKey);
         template.setUsePublisherConnection(usePublisherConnection);
         AsyncRabbitTemplate asyncTemplate = new AsyncRabbitTemplate(template);
+        // use receive timeout (for reply timeout) on the async template
         asyncTemplate.setReceiveTimeout(replyTimeout);
         return asyncTemplate;
     }


[camel] 01/02: CAMEL-19373: camel-spring-rabbitmq - Fix reply timeout (#10422)

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

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

commit 6d0aaec7e91f00e2560d0c50110e46237a969c02
Author: Steven Dürrenmatt <46...@users.noreply.github.com>
AuthorDate: Sun Jun 18 10:02:42 2023 +0200

    CAMEL-19373: camel-spring-rabbitmq - Fix reply timeout (#10422)
---
 .../apache/camel/component/springrabbit/SpringRabbitMQEndpoint.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQEndpoint.java b/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQEndpoint.java
index 25304e0d215..4c7cadf9611 100644
--- a/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQEndpoint.java
+++ b/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQEndpoint.java
@@ -550,9 +550,10 @@ public class SpringRabbitMQEndpoint extends DefaultEndpoint implements AsyncEndp
     public AsyncRabbitTemplate createInOutTemplate() {
         RabbitTemplate template = new RabbitTemplate(getConnectionFactory());
         template.setRoutingKey(routingKey);
-        template.setReplyTimeout(replyTimeout);
         template.setUsePublisherConnection(usePublisherConnection);
-        return new AsyncRabbitTemplate(template);
+        AsyncRabbitTemplate asyncTemplate = new AsyncRabbitTemplate(template);
+        asyncTemplate.setReceiveTimeout(replyTimeout);
+        return asyncTemplate;
     }
 
     public AbstractMessageListenerContainer createMessageListenerContainer() {