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

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


The following commit(s) were added to refs/heads/main by this push:
     new b747301df018 CAMEL-24068: camel-spring-rabbitmq - Align component 
replyTimeout default to 30000
b747301df018 is described below

commit b747301df018c0b9b961aca7071885ed0ecdcf50
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jul 15 17:06:25 2026 +0200

    CAMEL-24068: camel-spring-rabbitmq - Align component replyTimeout default 
to 30000
    
    The replyTimeout on SpringRabbitMQComponent defaulted to 5000ms while the
    endpoint documented and declared 30000ms. Since createEndpoint() copies the
    component value, the effective default was always 5s — contradicting the 
docs.
    
    Aligns the component default to 30000ms and adds an upgrade guide entry for
    users who relied on the 5-second effective timeout.
    
    Closes #24719
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 .../camel/catalog/components/spring-rabbitmq.json  |  2 +-
 .../component/springrabbit/spring-rabbitmq.json    |  2 +-
 .../springrabbit/SpringRabbitMQComponent.java      |  6 ++--
 .../springrabbit/SpringRabbitMQComponentTest.java  | 33 ++++++++++++++++++++++
 .../ROOT/pages/camel-4x-upgrade-guide-4_22.adoc    |  8 ++++++
 .../dsl/SpringRabbitmqComponentBuilderFactory.java |  4 +--
 6 files changed, 48 insertions(+), 7 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-rabbitmq.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-rabbitmq.json
index 1e71500b7f2d..340db9e5bec9 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-rabbitmq.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-rabbitmq.json
@@ -48,7 +48,7 @@
     "allowNullBody": { "index": 21, "kind": "property", "displayName": "Allow 
Null Body", "group": "producer", "label": "producer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Whether to allow 
sending messages with no body. If this option is false and the message body is 
null, then an MessageConversionException is thrown." },
     "autoDeclareProducer": { "index": 22, "kind": "property", "displayName": 
"Auto Declare Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Specifies whether the producer should auto declare binding between exchange, 
queue and routing key when starting. Enabling this can be good for development 
to make it easy to standup exchang [...]
     "lazyStartProducer": { "index": 23, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "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 otherwise fai [...]
-    "replyTimeout": { "index": 24, "kind": "property", "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 messaging. The default value is 5 seconds. A negative value 
indicates an indefinite timeout." },
+    "replyTimeout": { "index": 24, "kind": "property", "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 messaging. The default value is 30 seconds. A negative value 
indicates an indefinite timeout." },
     "args": { "index": 25, "kind": "property", "displayName": "Args", "group": 
"advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "java.util.Map<java.lang.String, java.lang.Object>", "deprecated": 
false, "autowired": false, "secret": false, "description": "Specify arguments 
for configuring the different RabbitMQ concepts, a different prefix is required 
for each element: consumer. exchange. queue. binding. dlq.exchange. dlq.queue. 
dlq.binding. For example to [...]
     "autowiredEnabled": { "index": 26, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching  [...]
     "ignoreDeclarationExceptions": { "index": 27, "kind": "property", 
"displayName": "Ignore Declaration Exceptions", "group": "advanced", "label": 
"advanced", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "description": "Switch on ignore exceptions such as mismatched 
properties when declaring" },
diff --git 
a/components/camel-spring-parent/camel-spring-rabbitmq/src/generated/resources/META-INF/org/apache/camel/component/springrabbit/spring-rabbitmq.json
 
b/components/camel-spring-parent/camel-spring-rabbitmq/src/generated/resources/META-INF/org/apache/camel/component/springrabbit/spring-rabbitmq.json
index 1e71500b7f2d..340db9e5bec9 100644
--- 
a/components/camel-spring-parent/camel-spring-rabbitmq/src/generated/resources/META-INF/org/apache/camel/component/springrabbit/spring-rabbitmq.json
+++ 
b/components/camel-spring-parent/camel-spring-rabbitmq/src/generated/resources/META-INF/org/apache/camel/component/springrabbit/spring-rabbitmq.json
@@ -48,7 +48,7 @@
     "allowNullBody": { "index": 21, "kind": "property", "displayName": "Allow 
Null Body", "group": "producer", "label": "producer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Whether to allow 
sending messages with no body. If this option is false and the message body is 
null, then an MessageConversionException is thrown." },
     "autoDeclareProducer": { "index": 22, "kind": "property", "displayName": 
"Auto Declare Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Specifies whether the producer should auto declare binding between exchange, 
queue and routing key when starting. Enabling this can be good for development 
to make it easy to standup exchang [...]
     "lazyStartProducer": { "index": 23, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "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 otherwise fai [...]
-    "replyTimeout": { "index": 24, "kind": "property", "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 messaging. The default value is 5 seconds. A negative value 
indicates an indefinite timeout." },
+    "replyTimeout": { "index": 24, "kind": "property", "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 messaging. The default value is 30 seconds. A negative value 
indicates an indefinite timeout." },
     "args": { "index": 25, "kind": "property", "displayName": "Args", "group": 
"advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "java.util.Map<java.lang.String, java.lang.Object>", "deprecated": 
false, "autowired": false, "secret": false, "description": "Specify arguments 
for configuring the different RabbitMQ concepts, a different prefix is required 
for each element: consumer. exchange. queue. binding. dlq.exchange. dlq.queue. 
dlq.binding. For example to [...]
     "autowiredEnabled": { "index": 26, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching  [...]
     "ignoreDeclarationExceptions": { "index": 27, "kind": "property", 
"displayName": "Ignore Declaration Exceptions", "group": "advanced", "label": 
"advanced", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "description": "Switch on ignore exceptions such as mismatched 
properties when declaring" },
diff --git 
a/components/camel-spring-parent/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQComponent.java
 
b/components/camel-spring-parent/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQComponent.java
index 14304e099685..9ffc4173bb63 100644
--- 
a/components/camel-spring-parent/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQComponent.java
+++ 
b/components/camel-spring-parent/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQComponent.java
@@ -67,10 +67,10 @@ public class SpringRabbitMQComponent extends 
HeaderFilterStrategyComponent {
     @Metadata(label = "advanced",
               description = "To use a custom MessagePropertiesConverter so you 
can be in control how to map to/from a 
org.springframework.amqp.core.MessageProperties.")
     private MessagePropertiesConverter messagePropertiesConverter;
-    @Metadata(label = "producer", javaType = "java.time.Duration", 
defaultValue = "5000",
+    @Metadata(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 messaging."
-                            + " The default value is 5 seconds. A negative 
value indicates an indefinite timeout.")
-    private long replyTimeout = 5000;
+                            + " The default value is 30 seconds. A negative 
value indicates an indefinite timeout.")
+    private long replyTimeout = 30000;
     @Metadata(label = "consumer", description = "The name of the dead letter 
exchange")
     private String deadLetterExchange;
     @Metadata(label = "consumer", description = "The name of the dead letter 
queue")
diff --git 
a/components/camel-spring-parent/camel-spring-rabbitmq/src/test/java/org/apache/camel/component/springrabbit/SpringRabbitMQComponentTest.java
 
b/components/camel-spring-parent/camel-spring-rabbitmq/src/test/java/org/apache/camel/component/springrabbit/SpringRabbitMQComponentTest.java
new file mode 100644
index 000000000000..50a23f309c92
--- /dev/null
+++ 
b/components/camel-spring-parent/camel-spring-rabbitmq/src/test/java/org/apache/camel/component/springrabbit/SpringRabbitMQComponentTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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.component.springrabbit;
+
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class SpringRabbitMQComponentTest extends CamelTestSupport {
+
+    @Test
+    public void testReplyTimeoutDefault() throws Exception {
+        SpringRabbitMQEndpoint endpoint
+                = context.getEndpoint("spring-rabbitmq:test", 
SpringRabbitMQEndpoint.class);
+        assertEquals(30000, endpoint.getReplyTimeout(),
+                "replyTimeout should default to 30000 millis as documented on 
the endpoint option");
+    }
+}
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
index dfdcc67db020..159d8dc25dec 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
@@ -428,6 +428,14 @@ The clustered route controller property 
`camel.clustered.controller.initial-dela
 it keeps its `String` type because it supports Camel time patterns (for 
example `10 seconds`)
 that `Duration` binding does not.
 
+=== camel-spring-rabbitmq - replyTimeout default aligned
+
+The `replyTimeout` option on the component level has been fixed to default to 
30 seconds,
+aligning it with the endpoint-level default that was documented since Camel 
3.20.7 / 3.21.
+Previously, the component-level default was still 5 seconds, which would 
override the
+endpoint's declared 30-second default. If you were relying on the effective 
5-second timeout,
+you can restore it by explicitly setting `replyTimeout=5000` on the component 
or endpoint.
+
 === camel-core - Multicast UseOriginalAggregationStrategy fix
 
 The Multicast EIP now correctly honors `UseOriginalAggregationStrategy`, 
consistent with the Splitter
diff --git 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SpringRabbitmqComponentBuilderFactory.java
 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SpringRabbitmqComponentBuilderFactory.java
index 07454e6bf8fc..7fdd1b554dad 100644
--- 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SpringRabbitmqComponentBuilderFactory.java
+++ 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SpringRabbitmqComponentBuilderFactory.java
@@ -495,11 +495,11 @@ public interface SpringRabbitmqComponentBuilderFactory {
         /**
          * Specify the timeout in milliseconds to be used when waiting for a
          * reply message when doing request/reply messaging. The default value
-         * is 5 seconds. A negative value indicates an indefinite timeout.
+         * is 30 seconds. A negative value indicates an indefinite timeout.
          * 
          * The option is a: &lt;code&gt;long&lt;/code&gt; type.
          * 
-         * Default: 5000
+         * Default: 30000
          * Group: producer
          * 
          * @param replyTimeout the value to set

Reply via email to