Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 exchanges, queues and bindings on the broker." },
"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 fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." },
"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 declare a queue with message ttl argument: queue.x-message-ttl=60000" },
"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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." },
"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" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 exchanges, queues and bindings on the broker." },
"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 fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." },
"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 declare a queue with message ttl argument: queue.x-message-ttl=60000" },
"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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." },
"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" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,11 +495,11 @@ default SpringRabbitmqComponentBuilder lazyStartProducer(boolean lazyStartProduc
/**
* 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
Expand Down