You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/08/11 11:23:06 UTC

[camel] 01/03: CAMEL-15520: removed the deprecated option connectTimeoutMillis from camel-consul

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

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

commit f2d2db87219837cdb4b7e305bcf2b31b1195e1fe
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Aug 11 10:53:57 2022 +0200

    CAMEL-15520: removed the deprecated option connectTimeoutMillis from camel-consul
---
 .../apache/camel/catalog/components/consul.json    |   2 -
 .../consul/ConsulComponentConfigurer.java          |   6 --
 .../component/consul/ConsulEndpointConfigurer.java |   6 --
 .../component/consul/ConsulEndpointUriFactory.java |   3 +-
 .../ConsulServiceDiscoveryFactoryConfigurer.java   |  12 +--
 .../org/apache/camel/component/consul/consul.json  |   2 -
 .../consul/ConsulClientConfiguration.java          |  20 +---
 .../cloud/ConsulServiceDiscoveryFactory.java       |  10 +-
 .../consul/cloud/ConsulServiceRegistry.java        |   9 +-
 .../consul/cluster/ConsulClusterService.java       |  10 +-
 .../ROOT/pages/camel-3x-upgrade-guide-3_19.adoc    |  13 +++
 .../dsl/ConsulComponentBuilderFactory.java         |  18 ----
 .../endpoint/dsl/ConsulEndpointBuilderFactory.java | 105 ---------------------
 13 files changed, 38 insertions(+), 178 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/consul.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/consul.json
index 106b59dcaa1..b46bd080f2e 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/consul.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/consul.json
@@ -23,7 +23,6 @@
   },
   "componentProperties": {
     "connectTimeout": { "kind": "property", "displayName": "Connect Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout for OkHttpClient" },
-    "connectTimeoutMillis": { "kind": "property", "displayName": "Connect Timeout Millis", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": true, "deprecationNote": "Use connectTimeout instead", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout for OkHttpClient. Deprecation note: Use conne [...]
     "consulClient": { "kind": "property", "displayName": "Consul Client", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "com.orbitz.consul.Consul", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Reference to a com.orbitz.consul.Consul in the registry." },
     "key": { "kind": "property", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" },
     "pingInstance": { "kind": "property", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" },
@@ -88,7 +87,6 @@
   "properties": {
     "apiEndpoint": { "kind": "path", "displayName": "Api Endpoint", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The API endpoint" },
     "connectTimeout": { "kind": "parameter", "displayName": "Connect Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout for OkHttpClient" },
-    "connectTimeoutMillis": { "kind": "parameter", "displayName": "Connect Timeout Millis", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": true, "deprecationNote": "Use connectTimeout instead", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout for OkHttpClient. Deprecation note: Use conn [...]
     "consulClient": { "kind": "parameter", "displayName": "Consul Client", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "com.orbitz.consul.Consul", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Reference to a com.orbitz.consul.Consul in the registry." },
     "key": { "kind": "parameter", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" },
     "pingInstance": { "kind": "parameter", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" },
diff --git a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulComponentConfigurer.java b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulComponentConfigurer.java
index 03457c8449d..5b3327e8352 100644
--- a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulComponentConfigurer.java
+++ b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulComponentConfigurer.java
@@ -40,8 +40,6 @@ public class ConsulComponentConfigurer extends PropertyConfigurerSupport impleme
         case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.consul.ConsulConfiguration.class, value)); return true;
         case "connecttimeout":
         case "connectTimeout": getOrCreateConfiguration(target).setConnectTimeout(property(camelContext, java.time.Duration.class, value)); return true;
-        case "connecttimeoutmillis":
-        case "connectTimeoutMillis": getOrCreateConfiguration(target).setConnectTimeoutMillis(property(camelContext, java.lang.Long.class, value)); return true;
         case "consistencymode":
         case "consistencyMode": getOrCreateConfiguration(target).setConsistencyMode(property(camelContext, com.orbitz.consul.option.ConsistencyMode.class, value)); return true;
         case "consulclient":
@@ -97,8 +95,6 @@ public class ConsulComponentConfigurer extends PropertyConfigurerSupport impleme
         case "configuration": return org.apache.camel.component.consul.ConsulConfiguration.class;
         case "connecttimeout":
         case "connectTimeout": return java.time.Duration.class;
-        case "connecttimeoutmillis":
-        case "connectTimeoutMillis": return java.lang.Long.class;
         case "consistencymode":
         case "consistencyMode": return com.orbitz.consul.option.ConsistencyMode.class;
         case "consulclient":
@@ -155,8 +151,6 @@ public class ConsulComponentConfigurer extends PropertyConfigurerSupport impleme
         case "configuration": return target.getConfiguration();
         case "connecttimeout":
         case "connectTimeout": return getOrCreateConfiguration(target).getConnectTimeout();
-        case "connecttimeoutmillis":
-        case "connectTimeoutMillis": return getOrCreateConfiguration(target).getConnectTimeoutMillis();
         case "consistencymode":
         case "consistencyMode": return getOrCreateConfiguration(target).getConsistencyMode();
         case "consulclient":
diff --git a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointConfigurer.java b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointConfigurer.java
index 2c4c86da335..b22a768c04b 100644
--- a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointConfigurer.java
+++ b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointConfigurer.java
@@ -30,8 +30,6 @@ public class ConsulEndpointConfigurer extends PropertyConfigurerSupport implemen
         case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
         case "connecttimeout":
         case "connectTimeout": target.getConfiguration().setConnectTimeout(property(camelContext, java.time.Duration.class, value)); return true;
-        case "connecttimeoutmillis":
-        case "connectTimeoutMillis": target.getConfiguration().setConnectTimeoutMillis(property(camelContext, java.lang.Long.class, value)); return true;
         case "consistencymode":
         case "consistencyMode": target.getConfiguration().setConsistencyMode(property(camelContext, com.orbitz.consul.option.ConsistencyMode.class, value)); return true;
         case "consulclient":
@@ -86,8 +84,6 @@ public class ConsulEndpointConfigurer extends PropertyConfigurerSupport implemen
         case "bridgeErrorHandler": return boolean.class;
         case "connecttimeout":
         case "connectTimeout": return java.time.Duration.class;
-        case "connecttimeoutmillis":
-        case "connectTimeoutMillis": return java.lang.Long.class;
         case "consistencymode":
         case "consistencyMode": return com.orbitz.consul.option.ConsistencyMode.class;
         case "consulclient":
@@ -143,8 +139,6 @@ public class ConsulEndpointConfigurer extends PropertyConfigurerSupport implemen
         case "bridgeErrorHandler": return target.isBridgeErrorHandler();
         case "connecttimeout":
         case "connectTimeout": return target.getConfiguration().getConnectTimeout();
-        case "connecttimeoutmillis":
-        case "connectTimeoutMillis": return target.getConfiguration().getConnectTimeoutMillis();
         case "consistencymode":
         case "consistencyMode": return target.getConfiguration().getConsistencyMode();
         case "consulclient":
diff --git a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointUriFactory.java b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointUriFactory.java
index 9047ca44d6f..d42d077adec 100644
--- a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointUriFactory.java
+++ b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointUriFactory.java
@@ -21,14 +21,13 @@ public class ConsulEndpointUriFactory extends org.apache.camel.support.component
     private static final Set<String> SECRET_PROPERTY_NAMES;
     private static final Set<String> MULTI_VALUE_PREFIXES;
     static {
-        Set<String> props = new HashSet<>(29);
+        Set<String> props = new HashSet<>(28);
         props.add("aclToken");
         props.add("action");
         props.add("apiEndpoint");
         props.add("blockSeconds");
         props.add("bridgeErrorHandler");
         props.add("connectTimeout");
-        props.add("connectTimeoutMillis");
         props.add("consistencyMode");
         props.add("consulClient");
         props.add("datacenter");
diff --git a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactoryConfigurer.java b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactoryConfigurer.java
index f9afa315b10..517cd9a1b8e 100644
--- a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactoryConfigurer.java
+++ b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactoryConfigurer.java
@@ -25,8 +25,8 @@ public class ConsulServiceDiscoveryFactoryConfigurer extends org.apache.camel.su
         case "AclToken": target.setAclToken(property(camelContext, java.lang.String.class, value)); return true;
         case "blockseconds":
         case "BlockSeconds": target.setBlockSeconds(property(camelContext, java.lang.Integer.class, value)); return true;
-        case "connecttimeoutmillis":
-        case "ConnectTimeoutMillis": target.setConnectTimeoutMillis(property(camelContext, java.lang.Long.class, value)); return true;
+        case "connecttimeout":
+        case "ConnectTimeout": target.setConnectTimeout(property(camelContext, java.time.Duration.class, value)); return true;
         case "datacenter":
         case "Datacenter": target.setDatacenter(property(camelContext, java.lang.String.class, value)); return true;
         case "password":
@@ -52,8 +52,8 @@ public class ConsulServiceDiscoveryFactoryConfigurer extends org.apache.camel.su
         case "AclToken": return java.lang.String.class;
         case "blockseconds":
         case "BlockSeconds": return java.lang.Integer.class;
-        case "connecttimeoutmillis":
-        case "ConnectTimeoutMillis": return java.lang.Long.class;
+        case "connecttimeout":
+        case "ConnectTimeout": return java.time.Duration.class;
         case "datacenter":
         case "Datacenter": return java.lang.String.class;
         case "password":
@@ -80,8 +80,8 @@ public class ConsulServiceDiscoveryFactoryConfigurer extends org.apache.camel.su
         case "AclToken": return target.getAclToken();
         case "blockseconds":
         case "BlockSeconds": return target.getBlockSeconds();
-        case "connecttimeoutmillis":
-        case "ConnectTimeoutMillis": return target.getConnectTimeoutMillis();
+        case "connecttimeout":
+        case "ConnectTimeout": return target.getConnectTimeout();
         case "datacenter":
         case "Datacenter": return target.getDatacenter();
         case "password":
diff --git a/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json b/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json
index 106b59dcaa1..b46bd080f2e 100644
--- a/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json
+++ b/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json
@@ -23,7 +23,6 @@
   },
   "componentProperties": {
     "connectTimeout": { "kind": "property", "displayName": "Connect Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout for OkHttpClient" },
-    "connectTimeoutMillis": { "kind": "property", "displayName": "Connect Timeout Millis", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": true, "deprecationNote": "Use connectTimeout instead", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout for OkHttpClient. Deprecation note: Use conne [...]
     "consulClient": { "kind": "property", "displayName": "Consul Client", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "com.orbitz.consul.Consul", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Reference to a com.orbitz.consul.Consul in the registry." },
     "key": { "kind": "property", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" },
     "pingInstance": { "kind": "property", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" },
@@ -88,7 +87,6 @@
   "properties": {
     "apiEndpoint": { "kind": "path", "displayName": "Api Endpoint", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The API endpoint" },
     "connectTimeout": { "kind": "parameter", "displayName": "Connect Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout for OkHttpClient" },
-    "connectTimeoutMillis": { "kind": "parameter", "displayName": "Connect Timeout Millis", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": true, "deprecationNote": "Use connectTimeout instead", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout for OkHttpClient. Deprecation note: Use conn [...]
     "consulClient": { "kind": "parameter", "displayName": "Consul Client", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "com.orbitz.consul.Consul", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Reference to a com.orbitz.consul.Consul in the registry." },
     "key": { "kind": "parameter", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" },
     "pingInstance": { "kind": "parameter", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" },
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
index 0c690eed183..a57b07875b1 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
@@ -59,10 +59,6 @@ public abstract class ConsulClientConfiguration implements Cloneable {
     @UriParam(label = "security", secret = true)
     private String password;
 
-    @Deprecated
-    @Metadata(deprecationNote = "Use connectTimeout instead")
-    @UriParam
-    private Long connectTimeoutMillis;
     @UriParam
     private Duration connectTimeout;
     @Deprecated
@@ -230,19 +226,6 @@ public abstract class ConsulClientConfiguration implements Cloneable {
         return ObjectHelper.isNotEmpty(userName) && ObjectHelper.isNotEmpty(password);
     }
 
-    public Long getConnectTimeoutMillis() {
-        return connectTimeoutMillis;
-    }
-
-    /**
-     * Connect timeout for OkHttpClient
-     *
-     * @deprecated use connectTimeout instead
-     */
-    public void setConnectTimeoutMillis(Long connectTimeoutMillis) {
-        this.connectTimeoutMillis = connectTimeoutMillis;
-    }
-
     public Duration getConnectTimeout() {
         return connectTimeout;
     }
@@ -372,9 +355,8 @@ public abstract class ConsulClientConfiguration implements Cloneable {
         }
         if (ObjectHelper.isNotEmpty(connectTimeout)) {
             builder.withConnectTimeoutMillis(connectTimeout.toMillis());
-        } else if (ObjectHelper.isNotEmpty(connectTimeoutMillis)) {
-            builder.withConnectTimeoutMillis(connectTimeoutMillis);
         }
+        
         if (ObjectHelper.isNotEmpty(readTimeout)) {
             builder.withConnectTimeoutMillis(readTimeout.toMillis());
         } else if (ObjectHelper.isNotEmpty(readTimeoutMillis)) {
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactory.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactory.java
index ea0d7276d90..20b626e5822 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactory.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactory.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.consul.cloud;
 
+import java.time.Duration;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.cloud.ServiceDiscovery;
 import org.apache.camel.cloud.ServiceDiscoveryFactory;
@@ -89,12 +91,12 @@ public class ConsulServiceDiscoveryFactory implements ServiceDiscoveryFactory {
         configuration.setPassword(password);
     }
 
-    public Long getConnectTimeoutMillis() {
-        return configuration.getConnectTimeoutMillis();
+    public Duration getConnectTimeout() {
+        return configuration.getConnectTimeout();
     }
 
-    public void setConnectTimeoutMillis(Long connectTimeoutMillis) {
-        configuration.setConnectTimeoutMillis(connectTimeoutMillis);
+    public void setConnectTimeout(Duration connectTimeout) {
+        configuration.setConnectTimeout(connectTimeout);
     }
 
     public Long getReadTimeoutMillis() {
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistry.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistry.java
index b6fefcd3c80..11c005e0f27 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistry.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistry.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.consul.cloud;
 
+import java.time.Duration;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
@@ -115,12 +116,12 @@ public class ConsulServiceRegistry extends AbstractServiceRegistry {
         configuration.setPassword(password);
     }
 
-    public Long getConnectTimeoutMillis() {
-        return configuration.getConnectTimeoutMillis();
+    public Duration getConnectTimeout() {
+        return configuration.getConnectTimeout();
     }
 
-    public void setConnectTimeoutMillis(Long connectTimeoutMillis) {
-        configuration.setConnectTimeoutMillis(connectTimeoutMillis);
+    public void setConnectTimeout(Duration connectTimeout) {
+        configuration.setConnectTimeout(connectTimeout);
     }
 
     public Long getReadTimeoutMillis() {
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cluster/ConsulClusterService.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cluster/ConsulClusterService.java
index 550ebcc985e..9689d58459e 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cluster/ConsulClusterService.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cluster/ConsulClusterService.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.consul.cluster;
 
+import java.time.Duration;
+
 import org.apache.camel.support.cluster.AbstractCamelClusterService;
 import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.util.ObjectHelper;
@@ -95,12 +97,12 @@ public final class ConsulClusterService extends AbstractCamelClusterService<Cons
         configuration.setPassword(password);
     }
 
-    public Long getConnectTimeoutMillis() {
-        return configuration.getConnectTimeoutMillis();
+    public Duration getConnectTimeout() {
+        return configuration.getConnectTimeout();
     }
 
-    public void setConnectTimeoutMillis(Long connectTimeoutMillis) {
-        configuration.setConnectTimeoutMillis(connectTimeoutMillis);
+    public void setConnectTimeout(Duration connectTimeout) {
+        configuration.setConnectTimeout(connectTimeout);
     }
 
     public Long getReadTimeoutMillis() {
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_19.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_19.adoc
index b9440888adf..7f725549299 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_19.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_19.adoc
@@ -44,3 +44,16 @@ spec:
 === camel-salesforce
 
 The URI format for consumer operations has changed. All consumer URIs now use the `subscribe` operation. E.g., `salesforce:subscribe:<topic_name>`, `salesforce:subscribe:event/<event_name>`, `salesforce:subscribe:data/ChangeEvents`.
+
+
+=== camel-consul
+
+The deprecated options were removed and should be replaced by the following options
+
+|===
+|Deprecated |Replace with
+
+|`connectTimeoutMillis`
+|`connectTimeout`
+|===
+
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ConsulComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ConsulComponentBuilderFactory.java
index 085adc0d9e7..4f164e377fc 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ConsulComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ConsulComponentBuilderFactory.java
@@ -65,23 +65,6 @@ public interface ConsulComponentBuilderFactory {
             doSetProperty("connectTimeout", connectTimeout);
             return this;
         }
-        /**
-         * Connect timeout for OkHttpClient. Deprecation note: Use
-         * connectTimeout instead.
-         * 
-         * The option is a: &lt;code&gt;java.lang.Long&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param connectTimeoutMillis the value to set
-         * @return the dsl builder
-         */
-        @Deprecated
-        default ConsulComponentBuilder connectTimeoutMillis(
-                java.lang.Long connectTimeoutMillis) {
-            doSetProperty("connectTimeoutMillis", connectTimeoutMillis);
-            return this;
-        }
         /**
          * Reference to a com.orbitz.consul.Consul in the registry.
          * 
@@ -542,7 +525,6 @@ public interface ConsulComponentBuilderFactory {
                 Object value) {
             switch (name) {
             case "connectTimeout": getOrCreateConfiguration((ConsulComponent) component).setConnectTimeout((java.time.Duration) value); return true;
-            case "connectTimeoutMillis": getOrCreateConfiguration((ConsulComponent) component).setConnectTimeoutMillis((java.lang.Long) value); return true;
             case "consulClient": getOrCreateConfiguration((ConsulComponent) component).setConsulClient((com.orbitz.consul.Consul) value); return true;
             case "key": getOrCreateConfiguration((ConsulComponent) component).setKey((java.lang.String) value); return true;
             case "pingInstance": getOrCreateConfiguration((ConsulComponent) component).setPingInstance((boolean) value); return true;
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ConsulEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ConsulEndpointBuilderFactory.java
index 2d82a3a40be..30c69a046d8 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ConsulEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ConsulEndpointBuilderFactory.java
@@ -74,41 +74,6 @@ public interface ConsulEndpointBuilderFactory {
             doSetProperty("connectTimeout", connectTimeout);
             return this;
         }
-        /**
-         * Connect timeout for OkHttpClient. Deprecation note: Use
-         * connectTimeout instead.
-         * 
-         * The option is a: &lt;code&gt;java.lang.Long&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param connectTimeoutMillis the value to set
-         * @return the dsl builder
-         */
-        @Deprecated
-        default ConsulEndpointConsumerBuilder connectTimeoutMillis(
-                Long connectTimeoutMillis) {
-            doSetProperty("connectTimeoutMillis", connectTimeoutMillis);
-            return this;
-        }
-        /**
-         * Connect timeout for OkHttpClient. Deprecation note: Use
-         * connectTimeout instead.
-         * 
-         * The option will be converted to a
-         * &lt;code&gt;java.lang.Long&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param connectTimeoutMillis the value to set
-         * @return the dsl builder
-         */
-        @Deprecated
-        default ConsulEndpointConsumerBuilder connectTimeoutMillis(
-                String connectTimeoutMillis) {
-            doSetProperty("connectTimeoutMillis", connectTimeoutMillis);
-            return this;
-        }
         /**
          * Reference to a com.orbitz.consul.Consul in the registry.
          * 
@@ -781,41 +746,6 @@ public interface ConsulEndpointBuilderFactory {
             doSetProperty("connectTimeout", connectTimeout);
             return this;
         }
-        /**
-         * Connect timeout for OkHttpClient. Deprecation note: Use
-         * connectTimeout instead.
-         * 
-         * The option is a: &lt;code&gt;java.lang.Long&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param connectTimeoutMillis the value to set
-         * @return the dsl builder
-         */
-        @Deprecated
-        default ConsulEndpointProducerBuilder connectTimeoutMillis(
-                Long connectTimeoutMillis) {
-            doSetProperty("connectTimeoutMillis", connectTimeoutMillis);
-            return this;
-        }
-        /**
-         * Connect timeout for OkHttpClient. Deprecation note: Use
-         * connectTimeout instead.
-         * 
-         * The option will be converted to a
-         * &lt;code&gt;java.lang.Long&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param connectTimeoutMillis the value to set
-         * @return the dsl builder
-         */
-        @Deprecated
-        default ConsulEndpointProducerBuilder connectTimeoutMillis(
-                String connectTimeoutMillis) {
-            doSetProperty("connectTimeoutMillis", connectTimeoutMillis);
-            return this;
-        }
         /**
          * Reference to a com.orbitz.consul.Consul in the registry.
          * 
@@ -1376,41 +1306,6 @@ public interface ConsulEndpointBuilderFactory {
             doSetProperty("connectTimeout", connectTimeout);
             return this;
         }
-        /**
-         * Connect timeout for OkHttpClient. Deprecation note: Use
-         * connectTimeout instead.
-         * 
-         * The option is a: &lt;code&gt;java.lang.Long&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param connectTimeoutMillis the value to set
-         * @return the dsl builder
-         */
-        @Deprecated
-        default ConsulEndpointBuilder connectTimeoutMillis(
-                Long connectTimeoutMillis) {
-            doSetProperty("connectTimeoutMillis", connectTimeoutMillis);
-            return this;
-        }
-        /**
-         * Connect timeout for OkHttpClient. Deprecation note: Use
-         * connectTimeout instead.
-         * 
-         * The option will be converted to a
-         * &lt;code&gt;java.lang.Long&lt;/code&gt; type.
-         * 
-         * Group: common
-         * 
-         * @param connectTimeoutMillis the value to set
-         * @return the dsl builder
-         */
-        @Deprecated
-        default ConsulEndpointBuilder connectTimeoutMillis(
-                String connectTimeoutMillis) {
-            doSetProperty("connectTimeoutMillis", connectTimeoutMillis);
-            return this;
-        }
         /**
          * Reference to a com.orbitz.consul.Consul in the registry.
          *