[
https://issues.apache.org/jira/browse/CAMEL-24068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Federico Mariani updated CAMEL-24068:
-------------------------------------
Attachment: SpringRabbitMQReplyTimeoutDefaultTest.java
> camel-spring-rabbitmq - Effective default of replyTimeout is 5000 millis
> instead of the documented 30000
> --------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24068
> URL: https://issues.apache.org/jira/browse/CAMEL-24068
> Project: Camel
> Issue Type: Bug
> Components: camel-spring-rabbitmq
> Affects Versions: 4.22.0
> Reporter: Federico Mariani
> Priority: Major
> Attachments: SpringRabbitMQReplyTimeoutDefaultTest.java
>
>
> The endpoint option {{replyTimeout}} is documented with default 30000 millis
> (30 seconds) and the field in {{SpringRabbitMQEndpoint}} is initialized
> accordingly:
> {code:java}
> @UriParam(label = "producer", javaType = "java.time.Duration", defaultValue =
> "30000", ...)
> private long replyTimeout = 30000;
> {code}
> However {{SpringRabbitMQComponent}} has its own {{replyTimeout}} option with
> default 5000, and {{createEndpoint()}} unconditionally overrides the endpoint
> value with it:
> {code:java}
> endpoint.setReplyTimeout(replyTimeout); // component field defaults to 5000
> {code}
> Since endpoints are always created through the component, the effective
> default for request/reply (InOut) messaging is 5 seconds, contradicting the
> endpoint documentation and the generated catalog. Users relying on the
> documented 30 seconds get a {{TimeoutException}} after 5 seconds.
> Attached reproducer fails on current main:
> {noformat}
> replyTimeout should default to 30000 millis as documented on the endpoint
> option ==> expected: <30000> but was: <5000>
> {noformat}
> Fix requires a decision on which default is intended: align the component
> default (and its docs, currently claiming 5 seconds) to 30000, or fix the
> endpoint annotation/docs to 5000. All other options duplicated on component
> and endpoint level have matching defaults; {{replyTimeout}} is the only
> mismatch.
> ----
> _This issue was found during an AI-assisted code review of
> camel-spring-rabbitmq: Claude Code on behalf of Federico Mariani (fmariani).
> A failing unit test reproducing the issue is attached._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)