Serdar Gökay created CAMEL-25873:
------------------------------------

             Summary: camel-milo - the component's reconnectTimeout setter sets 
the request timeout, and the reconnect delay is not configurable
                 Key: CAMEL-25873
                 URL: https://issues.apache.org/jira/browse/CAMEL-25873
             Project: Camel
          Issue Type: Bug
          Components: camel-milo
    Affects Versions: 4.23.0
            Reporter: Serdar Gökay


{{MiloClientComponent.setReconnectTimeout}} and 
{{MiloBrowseComponent.setReconnectTimeout}} (javadoc "Default reconnect 
timeout") call {{MiloClientConfiguration.setRequestTimeout}}. A reconnect 
timeout configured there therefore becomes the Milo request timeout of every 
service call (read, write, call, browse, CreateSession, CreateMonitoredItems), 
and the delay between two reconnect attempts stays what it has always been: 10 
000 ms, hard-coded where {{MiloClientConnection}} creates its 
{{SubscriptionManager}} (since the initial import of the component in 2017; the 
setter has pointed at the request timeout since CAMEL-14568 in 2020).

The two timeouts govern different things: the request timeout decides when a 
slow server call fails with {{Bad_Timeout}} and, in camel-milo, rebuilds the 
connection; the reconnect delay decides how often the client retries while the 
server is unreachable. A user who sets {{reconnectTimeout=2000}} on the 
component to retry faster keeps the 10 s retry and makes every request time out 
after 2 s instead.

The setter is not an {{@Metadata}} option, so it does not appear in the 
component documentation; it is reachable from Java and through property binding 
on the component.

*Proposal:* add a documented {{reconnectTimeout}} option to 
{{MiloClientConfiguration}} (label client, default 10000 ms, the current 
behaviour), pass it to {{SubscriptionManager}} in place of the constant, and 
make both component setters set it. I can provide the pull request.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to