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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8de4cb2  Update vertx to version 4.0.3. (#4969)
8de4cb2 is described below

commit 8de4cb24630693eef4f8743d9a4bc4c459b91b61
Author: James Hilliard <james.hillia...@gmail.com>
AuthorDate: Sun Apr 18 23:02:55 2021 -0600

    Update vertx to version 4.0.3. (#4969)
---
 camel-dependencies/pom.xml                         |  2 +-
 .../camel/catalog/components/vertx-http.json       |  2 +-
 .../org/apache/camel/catalog/components/vertx.json |  2 +-
 .../apache/camel/catalog/docs/vertx-component.adoc |  2 +-
 .../camel/catalog/docs/vertx-http-component.adoc   |  2 +-
 .../http/vertx/VertxPlatformHttpRouter.java        | 22 ++++--
 .../http/vertx/VertxPlatformHttpServer.java        |  4 +-
 .../http/vertx/VertxPlatformHttpServerSupport.java | 79 ++++++++++++++++----
 .../vertx/http/VertxHttpMethodConverterLoader.java | 38 ++++++++++
 .../services/org/apache/camel/TypeConverterLoader  |  2 +
 .../camel/component/vertx/http/vertx-http.json     |  2 +-
 .../src/main/docs/vertx-http-component.adoc        |  2 +-
 .../component/vertx/http/VertxHttpHelper.java      |  6 +-
 .../vertx/http/VertxHttpMethodConverter.java}      | 26 ++++---
 .../websocket/VertxWebsocketConfiguration.java     |  4 +-
 ...tContants.java => VertxWebsocketConstants.java} |  5 +-
 .../vertx/websocket/VertxWebsocketConsumer.java    | 11 +--
 .../vertx/websocket/VertxWebsocketEndpoint.java    |  4 +-
 .../vertx/websocket/VertxWebsocketHelper.java      | 83 +++++++++++++++++-----
 .../vertx/websocket/VertxWebsocketHost.java        | 77 +++++++++++++-------
 .../vertx/websocket/VertxWebsocketProducer.java    |  4 +-
 .../vertx/websocket/VertxWebSocketTestSupport.java | 32 +++------
 .../VertxWebsocketExternalServerTest.java          | 39 ++++++++--
 .../vertx/websocket/VertxWebsocketTest.java        |  8 +--
 .../component/vertx/VertxComponentConfigurer.java  |  4 +-
 .../org/apache/camel/component/vertx/vertx.json    |  2 +-
 .../camel-vertx/src/main/docs/vertx-component.adoc |  2 +-
 .../camel/component/vertx/VertxComponent.java      | 27 +++----
 .../dsl/VertxComponentBuilderFactory.java          |  6 +-
 .../dsl/VertxHttpEndpointBuilderFactory.java       | 18 +----
 .../modules/ROOT/pages/vertx-component.adoc        |  2 +-
 .../modules/ROOT/pages/vertx-http-component.adoc   |  2 +-
 parent/pom.xml                                     |  2 +-
 33 files changed, 353 insertions(+), 170 deletions(-)

diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index cd0a4f29..bb7846f 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -560,7 +560,7 @@
     <vavr-version>0.10.2</vavr-version>
     <velocity-tools-version>3.1</velocity-tools-version>
     <velocity-version>2.3</velocity-version>
-    <vertx-version>3.9.6</vertx-version>
+    <vertx-version>4.0.3</vertx-version>
     <vysper-version>0.7</vysper-version>
     <web3j-quorum-version>0.8.0</web3j-quorum-version>
     <web3j-version>3.6.0</web3j-version>
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx-http.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx-http.json
index 3cc0696..fda00cd 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx-http.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx-http.json
@@ -46,7 +46,7 @@
     "connectTimeout": { "kind": "parameter", "displayName": "Connect Timeout", 
"group": "producer", "label": "producer", "required": false, "type": "integer", 
"javaType": "int", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": 60000, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The amount of time in 
milliseconds until a connection is established. A timeout value of zer [...]
     "cookieStore": { "kind": "parameter", "displayName": "Cookie Store", 
"group": "producer", "label": "producer", "required": false, "type": "object", 
"javaType": "io.vertx.ext.web.client.spi.CookieStore", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "InMemoryCookieStore", 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "A custom CookieStore to 
use when session manage [...]
     "headerFilterStrategy": { "kind": "parameter", "displayName": "Header 
Filter Strategy", "group": "producer", "label": "producer", "required": false, 
"type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"VertxHttpHeaderFilterStrategy", "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "A custom org.apa [...]
-    "httpMethod": { "kind": "parameter", "displayName": "Http Method", 
"group": "producer", "label": "producer", "required": false, "type": "object", 
"javaType": "io.vertx.core.http.HttpMethod", "enum": [ "OPTIONS", "GET", 
"HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT", "PATCH", "OTHER" ], 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description" [...]
+    "httpMethod": { "kind": "parameter", "displayName": "Http Method", 
"group": "producer", "label": "producer", "required": false, "type": "object", 
"javaType": "io.vertx.core.http.HttpMethod", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The HTTP method to use. 
The HttpMethod header cannot override this option if set" },
     "lazyStartProducer": { "kind": "parameter", "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 sta [...]
     "okStatusCodeRange": { "kind": "parameter", "displayName": "Ok Status Code 
Range", "group": "producer", "label": "producer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "200-299", "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The status codes which 
are considered a success response. The values [...]
     "responsePayloadAsByteArray": { "kind": "parameter", "displayName": 
"Response Payload As Byte Array", "group": "producer", "label": "producer", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "Whether the response 
body should be byte or as io.vertx.core.b [...]
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx.json
index b92515b..76e614f 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/vertx.json
@@ -30,7 +30,7 @@
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Allows for bridging the 
consumer to the Camel routing Error Handler, which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages, or the likes, will 
now be processed as a me [...]
     "lazyStartProducer": { "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 star [...]
     "autowiredEnabled": { "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 t [...]
-    "vertxFactory": { "kind": "property", "displayName": "Vertx Factory", 
"group": "advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "io.vertx.core.spi.VertxFactory", "deprecated": false, "autowired": 
false, "secret": false, "description": "To use a custom VertxFactory 
implementation" }
+    "vertxFactory": { "kind": "property", "displayName": "Vertx Factory", 
"group": "advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "io.vertx.core.impl.VertxFactory", "deprecated": false, 
"autowired": false, "secret": false, "description": "To use a custom 
VertxFactory implementation" }
   },
   "properties": {
     "address": { "kind": "path", "displayName": "Address", "group": "common", 
"label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "Sets the event bus address used to 
communicate" },
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/vertx-component.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/vertx-component.adoc
index 947906c..f8e86c3 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/vertx-component.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/vertx-component.adoc
@@ -64,7 +64,7 @@ The Vert.x component supports 9 options, which are listed 
below.
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *lazyStartProducer* (producer) | 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 [...]
 | *autowiredEnabled* (advanced) | 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. | true | boolean
-| *vertxFactory* (advanced) | To use a custom VertxFactory implementation |  | 
VertxFactory
+| *vertxFactory* (advanced) | To use a custom VertxFactory implementation |  | 
VertxBuilder
 |===
 // component options: END
 
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/vertx-http-component.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/vertx-http-component.adoc
index 2c85d87..c5b69eb 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/vertx-http-component.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/vertx-http-component.adoc
@@ -93,7 +93,7 @@ with the following path and query parameters:
 | *connectTimeout* (producer) | The amount of time in milliseconds until a 
connection is established. A timeout value of zero is interpreted as an 
infinite timeout. | 60000 | int
 | *cookieStore* (producer) | A custom CookieStore to use when session 
management is enabled. If this option is not set then an in-memory CookieStore 
is used | InMemoryCookieStore | CookieStore
 | *headerFilterStrategy* (producer) | A custom 
org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel 
message. | VertxHttpHeaderFilterStrategy | HeaderFilterStrategy
-| *httpMethod* (producer) | The HTTP method to use. The HttpMethod header 
cannot override this option if set. There are 10 enums and the value can be one 
of: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, PATCH, OTHER |  | 
HttpMethod
+| *httpMethod* (producer) | The HTTP method to use. The HttpMethod header 
cannot override this option if set |  | HttpMethod
 | *lazyStartProducer* (producer) | 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 [...]
 | *okStatusCodeRange* (producer) | The status codes which are considered a 
success response. The values are inclusive. Multiple ranges can be defined, 
separated by comma, e.g. 200-204,209,301-304. Each range must be a single 
number or from-to with the dash included | 200-299 | String
 | *responsePayloadAsByteArray* (producer) | Whether the response body should 
be byte or as io.vertx.core.buffer.Buffer | true | boolean
diff --git 
a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpRouter.java
 
b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpRouter.java
index 79af470..b78c9a9 100644
--- 
a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpRouter.java
+++ 
b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpRouter.java
@@ -22,6 +22,7 @@ import io.vertx.core.Handler;
 import io.vertx.core.Vertx;
 import io.vertx.core.http.HttpMethod;
 import io.vertx.core.http.HttpServerRequest;
+import io.vertx.ext.web.AllowForwardHeaders;
 import io.vertx.ext.web.Route;
 import io.vertx.ext.web.Router;
 import io.vertx.ext.web.RoutingContext;
@@ -35,10 +36,12 @@ public class VertxPlatformHttpRouter implements Router {
 
     private final Vertx vertx;
     private final Router delegate;
+    private AllowForwardHeaders allowForward;
 
     public VertxPlatformHttpRouter(Vertx vertx, Router delegate) {
         this.vertx = vertx;
         this.delegate = delegate;
+        this.allowForward = AllowForwardHeaders.NONE;
     }
 
     public Vertx vertx() {
@@ -216,14 +219,13 @@ public class VertxPlatformHttpRouter implements Router {
     }
 
     @Override
-    public Router mountSubRouter(String s, Router router) {
-        return delegate.mountSubRouter(s, router);
-    }
+    public Route mountSubRouter(String mountPoint, Router subRouter) {
+        if (mountPoint.endsWith("*")) {
+            throw new IllegalArgumentException("Don't include * when mounting 
a sub router");
+        }
 
-    @Override
-    @Deprecated
-    public Router exceptionHandler(Handler<Throwable> handler) {
-        return delegate.exceptionHandler(handler);
+        return route(mountPoint + "*")
+                .subRouter(subRouter);
     }
 
     @Override
@@ -247,6 +249,12 @@ public class VertxPlatformHttpRouter implements Router {
     }
 
     @Override
+    public Router allowForward(AllowForwardHeaders allowForwardHeaders) {
+        this.allowForward = allowForwardHeaders;
+        return this;
+    }
+
+    @Override
     public void handle(HttpServerRequest request) {
         delegate.handle(request);
     }
diff --git 
a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServer.java
 
b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServer.java
index 99eec9d..8462ba5 100644
--- 
a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServer.java
+++ 
b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServer.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.platform.http.vertx;
 
+import java.io.IOException;
+import java.security.GeneralSecurityException;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
@@ -159,7 +161,7 @@ public class VertxPlatformHttpServer extends ServiceSupport 
implements CamelCont
                 });
     }
 
-    protected void startServer() {
+    protected void startServer() throws GeneralSecurityException, IOException {
         HttpServerOptions options = new HttpServerOptions();
 
         configureSSL(options, configuration, context);
diff --git 
a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServerSupport.java
 
b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServerSupport.java
index bfff0e1..c7336f1 100644
--- 
a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServerSupport.java
+++ 
b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServerSupport.java
@@ -22,11 +22,14 @@ import java.security.KeyStore;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
+import java.util.function.Function;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
 import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509KeyManager;
 
 import io.vertx.core.Handler;
 import io.vertx.core.Vertx;
@@ -35,7 +38,8 @@ import io.vertx.core.http.HttpMethod;
 import io.vertx.core.http.HttpServerOptions;
 import io.vertx.core.http.HttpServerRequest;
 import io.vertx.core.http.HttpServerResponse;
-import io.vertx.core.net.JksOptions;
+import io.vertx.core.net.KeyCertOptions;
+import io.vertx.core.net.TrustOptions;
 import io.vertx.ext.web.RoutingContext;
 import io.vertx.ext.web.handler.BodyHandler;
 import org.apache.camel.CamelContext;
@@ -164,31 +168,76 @@ public final class VertxPlatformHttpServerSupport {
     // *****************************
 
     static HttpServerOptions configureSSL(
-            HttpServerOptions options, VertxPlatformHttpServerConfiguration 
configuration, CamelContext camelContext) {
+            HttpServerOptions options, VertxPlatformHttpServerConfiguration 
configuration, CamelContext camelContext)
+            throws GeneralSecurityException, IOException {
         final SSLContextParameters sslParameters = 
configuration.getSslContextParameters() != null
                 ? configuration.getSslContextParameters()
                 : configuration.isUseGlobalSslContextParameters() ? 
camelContext.getSSLContextParameters() : null;
 
         if (sslParameters != null) {
             options.setSsl(true);
-            options.setKeyCertOptions(new JksOptions() {
-                @Override
-                public KeyManagerFactory getKeyManagerFactory(Vertx vertx) 
throws Exception {
-                    return createKeyManagerFactory(camelContext, 
sslParameters);
-                }
-            });
-
-            options.setTrustOptions(new JksOptions() {
-                @Override
-                public TrustManagerFactory getTrustManagerFactory(Vertx vertx) 
throws Exception {
-                    return createTrustManagerFactory(camelContext, 
sslParameters);
-                }
-            });
+            options.setKeyCertOptions(new 
KeyManagerFactoryOptions(createKeyManagerFactory(camelContext, sslParameters)));
+            options.setTrustOptions(new 
TrustManagerFactoryOptions(createTrustManagerFactory(camelContext, 
sslParameters)));
         }
 
         return options;
     }
 
+    private static class KeyManagerFactoryOptions implements KeyCertOptions {
+        private final KeyManagerFactory keyManagerFactory;
+
+        public KeyManagerFactoryOptions(KeyManagerFactory keyManagerFactory) {
+            this.keyManagerFactory = keyManagerFactory;
+        }
+
+        private KeyManagerFactoryOptions(KeyManagerFactoryOptions other) {
+            this.keyManagerFactory = other.keyManagerFactory;
+        }
+
+        @Override
+        public KeyCertOptions copy() {
+            return new KeyManagerFactoryOptions(this);
+        }
+
+        @Override
+        public KeyManagerFactory getKeyManagerFactory(Vertx vertx) {
+            return keyManagerFactory;
+        }
+
+        @Override
+        public Function<String, X509KeyManager> keyManagerMapper(Vertx vertx) {
+            return keyManagerFactory.getKeyManagers()[0] instanceof 
X509KeyManager
+                    ? serverName -> (X509KeyManager) 
keyManagerFactory.getKeyManagers()[0] : null;
+        }
+    }
+
+    private static class TrustManagerFactoryOptions implements TrustOptions {
+        private final TrustManagerFactory trustManagerFactory;
+
+        public TrustManagerFactoryOptions(TrustManagerFactory 
trustManagerFactory) {
+            this.trustManagerFactory = trustManagerFactory;
+        }
+
+        private TrustManagerFactoryOptions(TrustManagerFactoryOptions other) {
+            trustManagerFactory = other.trustManagerFactory;
+        }
+
+        @Override
+        public TrustOptions copy() {
+            return new TrustManagerFactoryOptions(this);
+        }
+
+        @Override
+        public TrustManagerFactory getTrustManagerFactory(Vertx vertx) {
+            return trustManagerFactory;
+        }
+
+        @Override
+        public Function<String, TrustManager[]> trustManagerMapper(Vertx 
vertx) {
+            return serverName -> trustManagerFactory.getTrustManagers();
+        }
+    }
+
     private static KeyManagerFactory createKeyManagerFactory(
             CamelContext camelContext, SSLContextParameters 
sslContextParameters)
             throws GeneralSecurityException, IOException {
diff --git 
a/components/camel-vertx-http/src/generated/java/org/apache/camel/component/vertx/http/VertxHttpMethodConverterLoader.java
 
b/components/camel-vertx-http/src/generated/java/org/apache/camel/component/vertx/http/VertxHttpMethodConverterLoader.java
new file mode 100644
index 0000000..d52e153
--- /dev/null
+++ 
b/components/camel-vertx-http/src/generated/java/org/apache/camel/component/vertx/http/VertxHttpMethodConverterLoader.java
@@ -0,0 +1,38 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.vertx.http;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.TypeConversionException;
+import org.apache.camel.TypeConverterLoaderException;
+import org.apache.camel.spi.TypeConverterLoader;
+import org.apache.camel.spi.TypeConverterRegistry;
+import org.apache.camel.support.SimpleTypeConverter;
+import org.apache.camel.support.TypeConverterSupport;
+import org.apache.camel.util.DoubleMap;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public final class VertxHttpMethodConverterLoader implements 
TypeConverterLoader {
+
+    public VertxHttpMethodConverterLoader() {
+    }
+
+    @Override
+    public void load(TypeConverterRegistry registry) throws 
TypeConverterLoaderException {
+        registerConverters(registry);
+    }
+
+    private void registerConverters(TypeConverterRegistry registry) {
+        addTypeConverter(registry, io.vertx.core.http.HttpMethod.class, 
java.lang.String.class, false,
+            (type, exchange, value) -> 
org.apache.camel.component.vertx.http.VertxHttpMethodConverter.toHttpMethod((java.lang.String)
 value));
+        addTypeConverter(registry, java.lang.String.class, 
io.vertx.core.http.HttpMethod.class, false,
+            (type, exchange, value) -> 
org.apache.camel.component.vertx.http.VertxHttpMethodConverter.toString((io.vertx.core.http.HttpMethod)
 value));
+    }
+
+    private static void addTypeConverter(TypeConverterRegistry registry, 
Class<?> toType, Class<?> fromType, boolean allowNull, 
SimpleTypeConverter.ConversionMethod method) { 
+        registry.addTypeConverter(toType, fromType, new 
SimpleTypeConverter(allowNull, method));
+    }
+
+}
diff --git 
a/components/camel-vertx-http/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
 
b/components/camel-vertx-http/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
new file mode 100644
index 0000000..18a6730
--- /dev/null
+++ 
b/components/camel-vertx-http/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+org.apache.camel.component.vertx.http.VertxHttpMethodConverterLoader
diff --git 
a/components/camel-vertx-http/src/generated/resources/org/apache/camel/component/vertx/http/vertx-http.json
 
b/components/camel-vertx-http/src/generated/resources/org/apache/camel/component/vertx/http/vertx-http.json
index 3cc0696..fda00cd 100644
--- 
a/components/camel-vertx-http/src/generated/resources/org/apache/camel/component/vertx/http/vertx-http.json
+++ 
b/components/camel-vertx-http/src/generated/resources/org/apache/camel/component/vertx/http/vertx-http.json
@@ -46,7 +46,7 @@
     "connectTimeout": { "kind": "parameter", "displayName": "Connect Timeout", 
"group": "producer", "label": "producer", "required": false, "type": "integer", 
"javaType": "int", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": 60000, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The amount of time in 
milliseconds until a connection is established. A timeout value of zer [...]
     "cookieStore": { "kind": "parameter", "displayName": "Cookie Store", 
"group": "producer", "label": "producer", "required": false, "type": "object", 
"javaType": "io.vertx.ext.web.client.spi.CookieStore", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "InMemoryCookieStore", 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "A custom CookieStore to 
use when session manage [...]
     "headerFilterStrategy": { "kind": "parameter", "displayName": "Header 
Filter Strategy", "group": "producer", "label": "producer", "required": false, 
"type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"VertxHttpHeaderFilterStrategy", "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "A custom org.apa [...]
-    "httpMethod": { "kind": "parameter", "displayName": "Http Method", 
"group": "producer", "label": "producer", "required": false, "type": "object", 
"javaType": "io.vertx.core.http.HttpMethod", "enum": [ "OPTIONS", "GET", 
"HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT", "PATCH", "OTHER" ], 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description" [...]
+    "httpMethod": { "kind": "parameter", "displayName": "Http Method", 
"group": "producer", "label": "producer", "required": false, "type": "object", 
"javaType": "io.vertx.core.http.HttpMethod", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The HTTP method to use. 
The HttpMethod header cannot override this option if set" },
     "lazyStartProducer": { "kind": "parameter", "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 sta [...]
     "okStatusCodeRange": { "kind": "parameter", "displayName": "Ok Status Code 
Range", "group": "producer", "label": "producer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "200-299", "configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "The status codes which 
are considered a success response. The values [...]
     "responsePayloadAsByteArray": { "kind": "parameter", "displayName": 
"Response Payload As Byte Array", "group": "producer", "label": "producer", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.vertx.http.VertxHttpConfiguration", 
"configurationField": "configuration", "description": "Whether the response 
body should be byte or as io.vertx.core.b [...]
diff --git 
a/components/camel-vertx-http/src/main/docs/vertx-http-component.adoc 
b/components/camel-vertx-http/src/main/docs/vertx-http-component.adoc
index 2c85d87..c5b69eb 100644
--- a/components/camel-vertx-http/src/main/docs/vertx-http-component.adoc
+++ b/components/camel-vertx-http/src/main/docs/vertx-http-component.adoc
@@ -93,7 +93,7 @@ with the following path and query parameters:
 | *connectTimeout* (producer) | The amount of time in milliseconds until a 
connection is established. A timeout value of zero is interpreted as an 
infinite timeout. | 60000 | int
 | *cookieStore* (producer) | A custom CookieStore to use when session 
management is enabled. If this option is not set then an in-memory CookieStore 
is used | InMemoryCookieStore | CookieStore
 | *headerFilterStrategy* (producer) | A custom 
org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel 
message. | VertxHttpHeaderFilterStrategy | HeaderFilterStrategy
-| *httpMethod* (producer) | The HTTP method to use. The HttpMethod header 
cannot override this option if set. There are 10 enums and the value can be one 
of: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, PATCH, OTHER |  | 
HttpMethod
+| *httpMethod* (producer) | The HTTP method to use. The HttpMethod header 
cannot override this option if set |  | HttpMethod
 | *lazyStartProducer* (producer) | 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 [...]
 | *okStatusCodeRange* (producer) | The status codes which are considered a 
success response. The values are inclusive. Multiple ranges can be defined, 
separated by comma, e.g. 200-204,209,301-304. Each range must be a single 
number or from-to with the dash included | 200-299 | String
 | *responsePayloadAsByteArray* (producer) | Whether the response body should 
be byte or as io.vertx.core.buffer.Buffer | true | boolean
diff --git 
a/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpHelper.java
 
b/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpHelper.java
index df0f90f..63aedb7 100644
--- 
a/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpHelper.java
+++ 
b/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpHelper.java
@@ -29,7 +29,7 @@ import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.TrustManagerFactory;
 
 import io.vertx.core.Vertx;
-import io.vertx.core.net.JksOptions;
+import io.vertx.core.net.KeyStoreOptions;
 import io.vertx.core.net.TCPSSLOptions;
 import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePropertyKey;
@@ -53,13 +53,13 @@ public final class VertxHttpHelper {
      */
     public static void setupSSLOptions(SSLContextParameters 
sslContextParameters, TCPSSLOptions options) {
         options.setSsl(true);
-        options.setKeyCertOptions(new JksOptions() {
+        options.setKeyCertOptions(new KeyStoreOptions() {
             @Override
             public KeyManagerFactory getKeyManagerFactory(Vertx vertx) throws 
Exception {
                 return createKeyManagerFactory(sslContextParameters);
             }
         });
-        options.setTrustOptions(new JksOptions() {
+        options.setTrustOptions(new KeyStoreOptions() {
             @Override
             public TrustManagerFactory getTrustManagerFactory(Vertx vertx) 
throws Exception {
                 return createTrustManagerFactory(sslContextParameters);
diff --git 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketContants.java
 
b/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpMethodConverter.java
similarity index 58%
copy from 
components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketContants.java
copy to 
components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpMethodConverter.java
index 32fba84..2fdbdc1 100644
--- 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketContants.java
+++ 
b/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpMethodConverter.java
@@ -14,19 +14,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.vertx.websocket;
+package org.apache.camel.component.vertx.http;
 
-import io.vertx.core.net.NetServerOptions;
+import io.vertx.core.http.HttpMethod;
+import org.apache.camel.Converter;
 
-public final class VertxWebsocketContants {
+/**
+ * Converter methods to convert from / to Vert.x HttpMethod
+ */
+@Converter(generateLoader = true)
+public final class VertxHttpMethodConverter {
 
-    public static final String DEFAULT_VERTX_SERVER_HOST = 
NetServerOptions.DEFAULT_HOST;
-    public static final int DEFAULT_VERTX_SERVER_PORT = 
NetServerOptions.DEFAULT_PORT;
-    public static final String DEFAULT_VERTX_SERVER_PATH = "/";
+    private VertxHttpMethodConverter() {
+    }
 
-    public static final String CONNECTION_KEY = 
"CamelVertxWebsocket.connectionKey";
-    public static final String SEND_TO_ALL = "CamelVertxWebsocket.sendToAll";
+    @Converter
+    public static HttpMethod toHttpMethod(String string) {
+        return HttpMethod.valueOf(string);
+    }
 
-    private VertxWebsocketContants() {
+    @Converter
+    public static String toString(HttpMethod method) {
+        return method.toString();
     }
 }
diff --git 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConfiguration.java
 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConfiguration.java
index c77981a..0906c3e 100644
--- 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConfiguration.java
+++ 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConfiguration.java
@@ -28,11 +28,11 @@ import org.apache.camel.support.jsse.SSLContextParameters;
 @UriParams
 public class VertxWebsocketConfiguration {
 
-    @UriPath(name = "host", defaultValue = 
VertxWebsocketContants.DEFAULT_VERTX_SERVER_HOST)
+    @UriPath(name = "host", defaultValue = 
VertxWebsocketConstants.DEFAULT_VERTX_SERVER_HOST)
     private String host;
     @UriPath(name = "port", defaultValue = "0")
     private int port;
-    @UriPath(name = "path", defaultValue = 
VertxWebsocketContants.DEFAULT_VERTX_SERVER_PATH)
+    @UriPath(name = "path", defaultValue = 
VertxWebsocketConstants.DEFAULT_VERTX_SERVER_PATH)
     @Metadata(required = true)
     private String path;
     @UriParam(label = "consumer")
diff --git 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketContants.java
 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConstants.java
similarity index 88%
rename from 
components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketContants.java
rename to 
components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConstants.java
index 32fba84..5f3c928 100644
--- 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketContants.java
+++ 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConstants.java
@@ -18,7 +18,7 @@ package org.apache.camel.component.vertx.websocket;
 
 import io.vertx.core.net.NetServerOptions;
 
-public final class VertxWebsocketContants {
+public final class VertxWebsocketConstants {
 
     public static final String DEFAULT_VERTX_SERVER_HOST = 
NetServerOptions.DEFAULT_HOST;
     public static final int DEFAULT_VERTX_SERVER_PORT = 
NetServerOptions.DEFAULT_PORT;
@@ -26,7 +26,8 @@ public final class VertxWebsocketContants {
 
     public static final String CONNECTION_KEY = 
"CamelVertxWebsocket.connectionKey";
     public static final String SEND_TO_ALL = "CamelVertxWebsocket.sendToAll";
+    public static final String REMOTE_ADDRESS = 
"CamelVertxWebsocket.remoteAddress";
 
-    private VertxWebsocketContants() {
+    private VertxWebsocketConstants() {
     }
 }
diff --git 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConsumer.java
 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConsumer.java
index 33af68a..d90ab65 100644
--- 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConsumer.java
+++ 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketConsumer.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.vertx.websocket;
 
+import io.vertx.core.net.SocketAddress;
 import org.apache.camel.AsyncCallback;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
@@ -58,9 +59,10 @@ public class VertxWebsocketConsumer extends DefaultConsumer {
         return endpoint.getComponent();
     }
 
-    public void onMessage(String connectionKey, Object message) {
+    public void onMessage(String connectionKey, Object message, SocketAddress 
remote) {
         Exchange exchange = createExchange(true);
-        exchange.getMessage().setHeader(VertxWebsocketContants.CONNECTION_KEY, 
connectionKey);
+        
exchange.getMessage().setHeader(VertxWebsocketConstants.REMOTE_ADDRESS, remote);
+        
exchange.getMessage().setHeader(VertxWebsocketConstants.CONNECTION_KEY, 
connectionKey);
         exchange.getMessage().setBody(message);
 
         // use default consumer callback
@@ -68,9 +70,10 @@ public class VertxWebsocketConsumer extends DefaultConsumer {
         getAsyncProcessor().process(exchange, cb);
     }
 
-    public void onException(String connectionKey, Throwable cause) {
+    public void onException(String connectionKey, Throwable cause, 
SocketAddress remote) {
         Exchange exchange = createExchange(false);
-        exchange.getMessage().setHeader(VertxWebsocketContants.CONNECTION_KEY, 
connectionKey);
+        
exchange.getMessage().setHeader(VertxWebsocketConstants.REMOTE_ADDRESS, remote);
+        
exchange.getMessage().setHeader(VertxWebsocketConstants.CONNECTION_KEY, 
connectionKey);
         getExceptionHandler().handleException("Error processing exchange", 
exchange, cause);
         releaseExchange(exchange, false);
     }
diff --git 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketEndpoint.java
 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketEndpoint.java
index 2f2d932..9d59a1d 100644
--- 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketEndpoint.java
+++ 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketEndpoint.java
@@ -19,9 +19,7 @@ package org.apache.camel.component.vertx.websocket;
 import java.util.Arrays;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
 
 import io.vertx.core.Vertx;
 import io.vertx.core.http.HttpClient;
@@ -92,7 +90,7 @@ public class VertxWebsocketEndpoint extends DefaultEndpoint {
         return getComponent().getVertx();
     }
 
-    protected WebSocket getWebSocket(Exchange exchange) throws 
InterruptedException, ExecutionException, TimeoutException {
+    protected WebSocket getWebSocket(Exchange exchange) throws Exception {
         if (webSocket == null || webSocket.isClosed()) {
             HttpClientOptions options = configuration.getClientOptions();
             HttpClient client;
diff --git 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketHelper.java
 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketHelper.java
index 1a29348..4592b9d 100644
--- 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketHelper.java
+++ 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketHelper.java
@@ -17,13 +17,17 @@
 package org.apache.camel.component.vertx.websocket;
 
 import java.security.KeyStore;
+import java.util.function.Function;
 
 import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509KeyManager;
 
 import io.vertx.core.Vertx;
-import io.vertx.core.net.JksOptions;
+import io.vertx.core.net.KeyCertOptions;
 import io.vertx.core.net.TCPSSLOptions;
+import io.vertx.core.net.TrustOptions;
 import org.apache.camel.support.jsse.KeyManagersParameters;
 import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.support.jsse.TrustManagersParameters;
@@ -37,20 +41,65 @@ public final class VertxWebsocketHelper {
     /**
      * Configures key store and trust store options for the Vert.x client and 
server
      */
-    public static void setupSSLOptions(SSLContextParameters 
sslContextParameters, TCPSSLOptions options) {
+    public static void setupSSLOptions(SSLContextParameters 
sslContextParameters, TCPSSLOptions options) throws Exception {
         options.setSsl(true);
-        options.setKeyCertOptions(new JksOptions() {
-            @Override
-            public KeyManagerFactory getKeyManagerFactory(Vertx vertx) throws 
Exception {
-                return createKeyManagerFactory(sslContextParameters);
-            }
-        });
-        options.setTrustOptions(new JksOptions() {
-            @Override
-            public TrustManagerFactory getTrustManagerFactory(Vertx vertx) 
throws Exception {
-                return createTrustManagerFactory(sslContextParameters);
-            }
-        });
+        options.setKeyCertOptions(new 
KeyManagerFactoryOptions(createKeyManagerFactory(sslContextParameters)));
+        options.setTrustOptions(new 
TrustManagerFactoryOptions(createTrustManagerFactory(sslContextParameters)));
+    }
+
+    private static class KeyManagerFactoryOptions implements KeyCertOptions {
+        private final KeyManagerFactory keyManagerFactory;
+
+        public KeyManagerFactoryOptions(KeyManagerFactory keyManagerFactory) {
+            this.keyManagerFactory = keyManagerFactory;
+        }
+
+        private KeyManagerFactoryOptions(KeyManagerFactoryOptions other) {
+            this.keyManagerFactory = other.keyManagerFactory;
+        }
+
+        @Override
+        public KeyCertOptions copy() {
+            return new KeyManagerFactoryOptions(this);
+        }
+
+        @Override
+        public KeyManagerFactory getKeyManagerFactory(Vertx vertx) {
+            return keyManagerFactory;
+        }
+
+        @Override
+        public Function<String, X509KeyManager> keyManagerMapper(Vertx vertx) {
+            return keyManagerFactory.getKeyManagers()[0] instanceof 
X509KeyManager
+                    ? serverName -> (X509KeyManager) 
keyManagerFactory.getKeyManagers()[0] : null;
+        }
+    }
+
+    private static class TrustManagerFactoryOptions implements TrustOptions {
+        private final TrustManagerFactory trustManagerFactory;
+
+        public TrustManagerFactoryOptions(TrustManagerFactory 
trustManagerFactory) {
+            this.trustManagerFactory = trustManagerFactory;
+        }
+
+        private TrustManagerFactoryOptions(TrustManagerFactoryOptions other) {
+            trustManagerFactory = other.trustManagerFactory;
+        }
+
+        @Override
+        public TrustOptions copy() {
+            return new TrustManagerFactoryOptions(this);
+        }
+
+        @Override
+        public TrustManagerFactory getTrustManagerFactory(Vertx vertx) {
+            return trustManagerFactory;
+        }
+
+        @Override
+        public Function<String, TrustManager[]> trustManagerMapper(Vertx 
vertx) {
+            return serverName -> trustManagerFactory.getTrustManagers();
+        }
     }
 
     /**
@@ -72,7 +121,7 @@ public final class VertxWebsocketHelper {
                 throw new IllegalArgumentException("Unable to parse port: " + 
result);
             }
         } else {
-            return VertxWebsocketContants.DEFAULT_VERTX_SERVER_PORT;
+            return VertxWebsocketConstants.DEFAULT_VERTX_SERVER_PORT;
         }
     }
 
@@ -85,7 +134,7 @@ public final class VertxWebsocketHelper {
         if (index != -1) {
             return remaining.substring(0, index);
         } else {
-            return VertxWebsocketContants.DEFAULT_VERTX_SERVER_HOST;
+            return VertxWebsocketConstants.DEFAULT_VERTX_SERVER_HOST;
         }
     }
 
@@ -98,7 +147,7 @@ public final class VertxWebsocketHelper {
         if (index != -1) {
             return remaining.substring(index);
         } else {
-            return VertxWebsocketContants.DEFAULT_VERTX_SERVER_PATH + 
remaining;
+            return VertxWebsocketConstants.DEFAULT_VERTX_SERVER_PATH + 
remaining;
         }
     }
 
diff --git 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketHost.java
 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketHost.java
index 9dcb3a5..9fb9490 100644
--- 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketHost.java
+++ 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketHost.java
@@ -24,6 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutionException;
 
 import io.vertx.core.Vertx;
+import io.vertx.core.http.HttpHeaders;
 import io.vertx.core.http.HttpServer;
 import io.vertx.core.http.HttpServerOptions;
 import io.vertx.core.http.HttpServerRequest;
@@ -48,7 +49,7 @@ public class VertxWebsocketHost {
     private final Map<String, Route> routeRegistry = new HashMap<>();
     private final Map<String, ServerWebSocket> connectedPeers = new 
ConcurrentHashMap<>();
     private HttpServer server;
-    private int port = VertxWebsocketContants.DEFAULT_VERTX_SERVER_PORT;
+    private int port = VertxWebsocketConstants.DEFAULT_VERTX_SERVER_PORT;
 
     public VertxWebsocketHost(VertxWebsocketHostConfiguration 
websocketHostConfiguration, VertxWebsocketHostKey key) {
         this.hostConfiguration = websocketHostConfiguration;
@@ -73,29 +74,57 @@ public class VertxWebsocketHost {
 
         route.handler(routingContext -> {
             HttpServerRequest request = routingContext.request();
-            ServerWebSocket webSocket = request.upgrade();
-            SocketAddress socketAddress = webSocket.localAddress();
-
-            String connectionKey = UUID.randomUUID().toString();
-            connectedPeers.put(connectionKey, webSocket);
-
-            if (LOG.isDebugEnabled()) {
-                if (socketAddress != null) {
-                    LOG.debug("WebSocket peer {} connected from {}", 
connectionKey, socketAddress.host());
+            String connectionHeader = 
request.headers().get(HttpHeaders.CONNECTION);
+            if (connectionHeader == null || 
!connectionHeader.toLowerCase().contains("upgrade")) {
+                routingContext.response().setStatusCode(400);
+                routingContext.response().end("Can \"Upgrade\" only to 
\"WebSocket\".");
+            } else {
+                // we're about to upgrade the connection, which means an 
asynchronous
+                // operation. We have to pause the request otherwise we will 
loose the
+                // body of the request once the upgrade completes
+                final boolean parseEnded = request.isEnded();
+                if (!parseEnded) {
+                    request.pause();
                 }
-            }
-
-            webSocket.textMessageHandler(message -> 
consumer.onMessage(connectionKey, message));
-            webSocket.binaryMessageHandler(message -> 
consumer.onMessage(connectionKey, message.getBytes()));
-            webSocket.exceptionHandler(exception -> 
consumer.onException(connectionKey, exception));
-            webSocket.closeHandler(closeEvent -> {
-                if (LOG.isDebugEnabled()) {
-                    if (socketAddress != null) {
-                        LOG.debug("WebSocket peer {} disconnected from {}", 
connectionKey, socketAddress.host());
+                // upgrade
+                request.toWebSocket(toWebSocket -> {
+                    if (toWebSocket.succeeded()) {
+                        // resume the parsing
+                        if (!parseEnded) {
+                            request.resume();
+                        }
+                        // handle the websocket session as usual
+                        ServerWebSocket webSocket = toWebSocket.result();
+                        SocketAddress socketAddress = webSocket.localAddress();
+                        SocketAddress remote = webSocket.remoteAddress();
+
+                        String connectionKey = UUID.randomUUID().toString();
+                        connectedPeers.put(connectionKey, webSocket);
+
+                        if (LOG.isDebugEnabled()) {
+                            if (socketAddress != null) {
+                                LOG.debug("WebSocket peer {} connected from 
{}", connectionKey, socketAddress.host());
+                            }
+                        }
+
+                        webSocket.textMessageHandler(message -> 
consumer.onMessage(connectionKey, message, remote));
+                        webSocket
+                                .binaryMessageHandler(message -> 
consumer.onMessage(connectionKey, message.getBytes(), remote));
+                        webSocket.exceptionHandler(exception -> 
consumer.onException(connectionKey, exception, remote));
+                        webSocket.closeHandler(closeEvent -> {
+                            if (LOG.isDebugEnabled()) {
+                                if (socketAddress != null) {
+                                    LOG.debug("WebSocket peer {} disconnected 
from {}", connectionKey, socketAddress.host());
+                                }
+                            }
+                            connectedPeers.remove(connectionKey);
+                        });
+                    } else {
+                        // the upgrade failed
+                        routingContext.fail(toWebSocket.cause());
                     }
-                }
-                connectedPeers.remove(connectionKey);
-            });
+                });
+            }
         });
 
         routeRegistry.put(configuration.getPath(), route);
@@ -120,7 +149,7 @@ public class VertxWebsocketHost {
     /**
      * Starts a Vert.x HTTP server to host the WebSocket router
      */
-    public void start() throws InterruptedException, ExecutionException {
+    public void start() throws Exception {
         if (server == null) {
             Vertx vertx = hostConfiguration.getVertx();
             Router router = hostConfiguration.getRouter();
@@ -178,7 +207,7 @@ public class VertxWebsocketHost {
         }
         connectedPeers.clear();
         routeRegistry.clear();
-        port = VertxWebsocketContants.DEFAULT_VERTX_SERVER_PORT;
+        port = VertxWebsocketConstants.DEFAULT_VERTX_SERVER_PORT;
     }
 
     /**
diff --git 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketProducer.java
 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketProducer.java
index 8ec6214..493d445 100644
--- 
a/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketProducer.java
+++ 
b/components/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketProducer.java
@@ -107,7 +107,7 @@ public class VertxWebsocketProducer extends 
DefaultAsyncProducer {
         Map<String, WebSocketBase> connectedPeers = new HashMap<>();
         VertxWebsocketEndpoint endpoint = getEndpoint();
 
-        String connectionKey = 
exchange.getMessage().getHeader(VertxWebsocketContants.CONNECTION_KEY, 
String.class);
+        String connectionKey = 
exchange.getMessage().getHeader(VertxWebsocketConstants.CONNECTION_KEY, 
String.class);
         if (connectionKey != null) {
             if (endpoint.isManagedPort()) {
                 Stream.of(connectionKey.split(","))
@@ -132,7 +132,7 @@ public class VertxWebsocketProducer extends 
DefaultAsyncProducer {
     }
 
     private boolean isSendToAll(Message message) {
-        Boolean value = message.getHeader(VertxWebsocketContants.SEND_TO_ALL, 
getEndpoint().getConfiguration().isSendToAll(),
+        Boolean value = message.getHeader(VertxWebsocketConstants.SEND_TO_ALL, 
getEndpoint().getConfiguration().isSendToAll(),
                 Boolean.class);
         return value == null ? false : value;
     }
diff --git 
a/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebSocketTestSupport.java
 
b/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebSocketTestSupport.java
index f7bf077..b9ba631 100644
--- 
a/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebSocketTestSupport.java
+++ 
b/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebSocketTestSupport.java
@@ -25,8 +25,6 @@ import java.util.function.Consumer;
 import io.vertx.core.Handler;
 import io.vertx.core.Vertx;
 import io.vertx.core.http.HttpClient;
-import io.vertx.core.http.HttpServerRequest;
-import io.vertx.core.http.ServerWebSocket;
 import io.vertx.core.http.WebSocket;
 import io.vertx.ext.web.Route;
 import io.vertx.ext.web.Router;
@@ -54,14 +52,9 @@ public class VertxWebSocketTestSupport extends 
CamelTestSupport {
 
     public WebSocket openWebSocketConnection(String host, int port, String 
path, Consumer<String> handler) throws Exception {
         HttpClient client = Vertx.vertx().createHttpClient();
-        CompletableFuture<WebSocket> future = new CompletableFuture<>();
-        client.webSocket(port, host, path, result -> {
-            if (!result.failed()) {
-                future.complete(result.result());
-            } else {
-                future.completeExceptionally(result.cause());
-            }
-        });
+        CompletableFuture<WebSocket> future = client.webSocket(port, host, 
path)
+                .toCompletionStage()
+                .toCompletableFuture();
         WebSocket webSocket = future.get(5, TimeUnit.SECONDS);
         webSocket.textMessageHandler(message -> handler.accept(message));
         return webSocket;
@@ -76,20 +69,11 @@ public class VertxWebSocketTestSupport extends 
CamelTestSupport {
         Route route = router.route(path);
 
         if (handler == null) {
-            handler = new Handler<RoutingContext>() {
-                @Override
-                public void handle(RoutingContext context) {
-                    HttpServerRequest request = context.request();
-                    ServerWebSocket webSocket = request.upgrade();
-                    webSocket.textMessageHandler(new Handler<String>() {
-                        @Override
-                        public void handle(String message) {
-                            webSocket.writeTextMessage("Hello world");
-                            latch.countDown();
-                        }
-                    });
-                }
-            };
+            handler = (RoutingContext ctx) -> ctx.request().toWebSocket()
+                    .onSuccess(webSocket -> 
webSocket.textMessageHandler(message -> {
+                        webSocket.writeTextMessage("Hello world");
+                        latch.countDown();
+                    }));
         }
 
         route.handler(handler);
diff --git 
a/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebsocketExternalServerTest.java
 
b/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebsocketExternalServerTest.java
index 8214f06..b286ea5 100644
--- 
a/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebsocketExternalServerTest.java
+++ 
b/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebsocketExternalServerTest.java
@@ -22,6 +22,7 @@ import java.util.concurrent.TimeUnit;
 
 import io.vertx.core.Handler;
 import io.vertx.core.Vertx;
+import io.vertx.core.http.HttpHeaders;
 import io.vertx.core.http.HttpServerOptions;
 import io.vertx.core.http.HttpServerRequest;
 import io.vertx.core.http.ServerWebSocket;
@@ -56,13 +57,39 @@ public class VertxWebsocketExternalServerTest extends 
VertxWebSocketTestSupport
                 String subProtocols = 
request.getHeader("Sec-WebSocket-Protocol");
                 assertEquals("foo,bar,cheese", subProtocols);
 
-                ServerWebSocket webSocket = request.upgrade();
-                webSocket.textMessageHandler(new Handler<String>() {
-                    @Override
-                    public void handle(String message) {
-                        latch.countDown();
+                String connectionHeader = 
request.headers().get(HttpHeaders.CONNECTION);
+                if (connectionHeader == null || 
!connectionHeader.toLowerCase().contains("upgrade")) {
+                    context.response().setStatusCode(400);
+                    context.response().end("Can \"Upgrade\" only to 
\"WebSocket\".");
+                } else {
+                    // we're about to upgrade the connection, which means an 
asynchronous
+                    // operation. We have to pause the request otherwise we 
will loose the
+                    // body of the request once the upgrade completes
+                    final boolean parseEnded = request.isEnded();
+                    if (!parseEnded) {
+                        request.pause();
                     }
-                });
+                    // upgrade
+                    request.toWebSocket(toWebSocket -> {
+                        if (toWebSocket.succeeded()) {
+                            // resume the parsing
+                            if (!parseEnded) {
+                                request.resume();
+                            }
+                            // handle the websocket session as usual
+                            ServerWebSocket webSocket = toWebSocket.result();
+                            webSocket.textMessageHandler(new Handler<String>() 
{
+                                @Override
+                                public void handle(String message) {
+                                    latch.countDown();
+                                }
+                            });
+                        } else {
+                            // the upgrade failed
+                            context.fail(toWebSocket.cause());
+                        }
+                    });
+                }
             }
         });
 
diff --git 
a/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebsocketTest.java
 
b/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebsocketTest.java
index bd327b5..11f456e 100644
--- 
a/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebsocketTest.java
+++ 
b/components/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/VertxWebsocketTest.java
@@ -108,7 +108,7 @@ public class VertxWebsocketTest extends 
VertxWebSocketTestSupport {
         String connectionKey = connectedPeers.keySet().iterator().next();
 
         template.sendBodyAndHeader("vertx-websocket:localhost:" + port + 
"/test", "Hello World",
-                VertxWebsocketContants.CONNECTION_KEY, connectionKey);
+                VertxWebsocketConstants.CONNECTION_KEY, connectionKey);
 
         assertTrue(latch.await(10, TimeUnit.SECONDS));
         assertEquals(expectedResultCount, results.size());
@@ -121,7 +121,7 @@ public class VertxWebsocketTest extends 
VertxWebSocketTestSupport {
         mockEndpoint.expectedBodiesReceived("Hello world");
         mockEndpoint.setResultWaitTime(500);
 
-        template.sendBodyAndHeader("direct:start", "Hello World", 
VertxWebsocketContants.CONNECTION_KEY, "invalid-key");
+        template.sendBodyAndHeader("direct:start", "Hello World", 
VertxWebsocketConstants.CONNECTION_KEY, "invalid-key");
 
         // Since the message body is null, the WebSocket producer will not 
send payload to the WS endpoint
         mockEndpoint.assertIsNotSatisfied();
@@ -154,7 +154,7 @@ public class VertxWebsocketTest extends 
VertxWebSocketTestSupport {
         }
 
         template.sendBodyAndHeader("vertx-websocket:localhost:" + port + 
"/test", "Hello World",
-                VertxWebsocketContants.CONNECTION_KEY, joiner.toString());
+                VertxWebsocketConstants.CONNECTION_KEY, joiner.toString());
 
         assertTrue(latch.await(10, TimeUnit.SECONDS));
         assertEquals(expectedResultCount, results.size());
@@ -202,7 +202,7 @@ public class VertxWebsocketTest extends 
VertxWebSocketTestSupport {
         }
 
         template.sendBodyAndHeader("vertx-websocket:localhost:" + port + 
"/test", "Hello World",
-                VertxWebsocketContants.SEND_TO_ALL, true);
+                VertxWebsocketConstants.SEND_TO_ALL, true);
 
         assertTrue(latch.await(10, TimeUnit.SECONDS));
         assertEquals(expectedResultCount, results.size());
diff --git 
a/components/camel-vertx/src/generated/java/org/apache/camel/component/vertx/VertxComponentConfigurer.java
 
b/components/camel-vertx/src/generated/java/org/apache/camel/component/vertx/VertxComponentConfigurer.java
index b9682d5..257b6d2 100644
--- 
a/components/camel-vertx/src/generated/java/org/apache/camel/component/vertx/VertxComponentConfigurer.java
+++ 
b/components/camel-vertx/src/generated/java/org/apache/camel/component/vertx/VertxComponentConfigurer.java
@@ -32,7 +32,7 @@ public class VertxComponentConfigurer extends 
PropertyConfigurerSupport implemen
         case "timeout": target.setTimeout(property(camelContext, int.class, 
value)); return true;
         case "vertx": target.setVertx(property(camelContext, 
io.vertx.core.Vertx.class, value)); return true;
         case "vertxfactory":
-        case "vertxFactory": target.setVertxFactory(property(camelContext, 
io.vertx.core.spi.VertxFactory.class, value)); return true;
+        case "vertxFactory": target.setVertxFactory(property(camelContext, 
io.vertx.core.impl.VertxBuilder.class, value)); return true;
         case "vertxoptions":
         case "vertxOptions": target.setVertxOptions(property(camelContext, 
io.vertx.core.VertxOptions.class, value)); return true;
         default: return false;
@@ -58,7 +58,7 @@ public class VertxComponentConfigurer extends 
PropertyConfigurerSupport implemen
         case "timeout": return int.class;
         case "vertx": return io.vertx.core.Vertx.class;
         case "vertxfactory":
-        case "vertxFactory": return io.vertx.core.spi.VertxFactory.class;
+        case "vertxFactory": return io.vertx.core.impl.VertxBuilder.class;
         case "vertxoptions":
         case "vertxOptions": return io.vertx.core.VertxOptions.class;
         default: return null;
diff --git 
a/components/camel-vertx/src/generated/resources/org/apache/camel/component/vertx/vertx.json
 
b/components/camel-vertx/src/generated/resources/org/apache/camel/component/vertx/vertx.json
index b92515b..b43d816 100644
--- 
a/components/camel-vertx/src/generated/resources/org/apache/camel/component/vertx/vertx.json
+++ 
b/components/camel-vertx/src/generated/resources/org/apache/camel/component/vertx/vertx.json
@@ -30,7 +30,7 @@
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Allows for bridging the 
consumer to the Camel routing Error Handler, which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages, or the likes, will 
now be processed as a me [...]
     "lazyStartProducer": { "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 star [...]
     "autowiredEnabled": { "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 t [...]
-    "vertxFactory": { "kind": "property", "displayName": "Vertx Factory", 
"group": "advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "io.vertx.core.spi.VertxFactory", "deprecated": false, "autowired": 
false, "secret": false, "description": "To use a custom VertxFactory 
implementation" }
+    "vertxFactory": { "kind": "property", "displayName": "Vertx Factory", 
"group": "advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "io.vertx.core.impl.VertxBuilder", "deprecated": false, 
"autowired": false, "secret": false, "description": "To use a custom 
VertxFactory implementation" }
   },
   "properties": {
     "address": { "kind": "path", "displayName": "Address", "group": "common", 
"label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "Sets the event bus address used to 
communicate" },
diff --git a/components/camel-vertx/src/main/docs/vertx-component.adoc 
b/components/camel-vertx/src/main/docs/vertx-component.adoc
index 947906c..f8e86c3 100644
--- a/components/camel-vertx/src/main/docs/vertx-component.adoc
+++ b/components/camel-vertx/src/main/docs/vertx-component.adoc
@@ -64,7 +64,7 @@ The Vert.x component supports 9 options, which are listed 
below.
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *lazyStartProducer* (producer) | 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 [...]
 | *autowiredEnabled* (advanced) | 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. | true | boolean
-| *vertxFactory* (advanced) | To use a custom VertxFactory implementation |  | 
VertxFactory
+| *vertxFactory* (advanced) | To use a custom VertxFactory implementation |  | 
VertxBuilder
 |===
 // component options: END
 
diff --git 
a/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/VertxComponent.java
 
b/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/VertxComponent.java
index ec24f3a..5f61eb2 100644
--- 
a/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/VertxComponent.java
+++ 
b/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/VertxComponent.java
@@ -24,8 +24,7 @@ import io.vertx.core.AsyncResult;
 import io.vertx.core.Handler;
 import io.vertx.core.Vertx;
 import io.vertx.core.VertxOptions;
-import io.vertx.core.impl.VertxFactoryImpl;
-import io.vertx.core.spi.VertxFactory;
+import io.vertx.core.impl.VertxBuilder;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.spi.Metadata;
@@ -43,7 +42,7 @@ public class VertxComponent extends DefaultComponent {
     private volatile boolean createdVertx;
 
     @Metadata(label = "advanced")
-    private VertxFactory vertxFactory;
+    private VertxBuilder vertxFactory;
     @Metadata(autowired = true)
     private Vertx vertx;
     @Metadata
@@ -62,14 +61,14 @@ public class VertxComponent extends DefaultComponent {
         super(context);
     }
 
-    public VertxFactory getVertxFactory() {
+    public VertxBuilder getVertxFactory() {
         return vertxFactory;
     }
 
     /**
      * To use a custom VertxFactory implementation
      */
-    public void setVertxFactory(VertxFactory vertxFactory) {
+    public void setVertxFactory(VertxBuilder vertxFactory) {
         this.vertxFactory = vertxFactory;
     }
 
@@ -143,33 +142,35 @@ public class VertxComponent extends DefaultComponent {
 
         if (vertx == null) {
 
-            if (vertxFactory == null) {
-                vertxFactory = new VertxFactoryImpl();
-            }
+            boolean clustered = false;
 
             if (vertxOptions == null) {
                 vertxOptions = new VertxOptions();
                 if (ObjectHelper.isNotEmpty(host)) {
                     vertxOptions.getEventBusOptions().setHost(host);
-                    vertxOptions.getEventBusOptions().setClustered(true);
+                    clustered = true;
                 }
                 if (port > 0) {
                     vertxOptions.getEventBusOptions().setPort(port);
-                    vertxOptions.getEventBusOptions().setClustered(true);
+                    clustered = true;
                 }
             }
 
+            if (vertxFactory == null) {
+                vertxFactory = new VertxBuilder(vertxOptions);
+            }
+
             // we are creating vertx so we should handle its lifecycle
             createdVertx = true;
 
             final CountDownLatch latch = new CountDownLatch(1);
 
             // lets using a host / port if a host name is specified
-            if (vertxOptions.getEventBusOptions().isClustered()) {
+            if (clustered) {
                 LOG.info("Creating Clustered Vertx {}:{}", 
vertxOptions.getEventBusOptions().getHost(),
                         vertxOptions.getEventBusOptions().getPort());
                 // use the async api as we want to wait for the eventbus to be 
ready before we are in started state
-                vertxFactory.clusteredVertx(vertxOptions, new 
Handler<AsyncResult<Vertx>>() {
+                vertxFactory.clusteredVertx(new Handler<AsyncResult<Vertx>>() {
                     @Override
                     public void handle(AsyncResult<Vertx> event) {
                         if (event.cause() != null) {
@@ -185,7 +186,7 @@ public class VertxComponent extends DefaultComponent {
                 });
             } else {
                 LOG.info("Creating Non-Clustered Vertx");
-                vertx = vertxFactory.vertx();
+                vertx = vertxFactory.init().vertx();
                 LOG.info("EventBus is ready: {}", vertx);
                 latch.countDown();
             }
diff --git 
a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/VertxComponentBuilderFactory.java
 
b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/VertxComponentBuilderFactory.java
index 26dfffa..fd16cc5 100644
--- 
a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/VertxComponentBuilderFactory.java
+++ 
b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/VertxComponentBuilderFactory.java
@@ -193,7 +193,7 @@ public interface VertxComponentBuilderFactory {
          * To use a custom VertxFactory implementation.
          * 
          * The option is a:
-         * &lt;code&gt;io.vertx.core.spi.VertxFactory&lt;/code&gt; type.
+         * &lt;code&gt;io.vertx.core.impl.VertxBuilder&lt;/code&gt; type.
          * 
          * Group: advanced
          * 
@@ -201,7 +201,7 @@ public interface VertxComponentBuilderFactory {
          * @return the dsl builder
          */
         default VertxComponentBuilder vertxFactory(
-                io.vertx.core.spi.VertxFactory vertxFactory) {
+                io.vertx.core.impl.VertxBuilder vertxFactory) {
             doSetProperty("vertxFactory", vertxFactory);
             return this;
         }
@@ -230,7 +230,7 @@ public interface VertxComponentBuilderFactory {
             case "bridgeErrorHandler": ((VertxComponent) 
component).setBridgeErrorHandler((boolean) value); return true;
             case "lazyStartProducer": ((VertxComponent) 
component).setLazyStartProducer((boolean) value); return true;
             case "autowiredEnabled": ((VertxComponent) 
component).setAutowiredEnabled((boolean) value); return true;
-            case "vertxFactory": ((VertxComponent) 
component).setVertxFactory((io.vertx.core.spi.VertxFactory) value); return true;
+            case "vertxFactory": ((VertxComponent) 
component).setVertxFactory((io.vertx.core.impl.VertxBuilder) value); return 
true;
             default: return false;
             }
         }
diff --git 
a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/VertxHttpEndpointBuilderFactory.java
 
b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/VertxHttpEndpointBuilderFactory.java
index fb126c5..6296437 100644
--- 
a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/VertxHttpEndpointBuilderFactory.java
+++ 
b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/VertxHttpEndpointBuilderFactory.java
@@ -153,7 +153,7 @@ public interface VertxHttpEndpointBuilderFactory {
          * @param httpMethod the value to set
          * @return the dsl builder
          */
-        default VertxHttpEndpointBuilder httpMethod(HttpMethod httpMethod) {
+        default VertxHttpEndpointBuilder httpMethod(Object httpMethod) {
             doSetProperty("httpMethod", httpMethod);
             return this;
         }
@@ -714,22 +714,6 @@ public interface VertxHttpEndpointBuilderFactory {
     }
 
     /**
-     * Proxy enum for <code>io.vertx.core.http.HttpMethod</code> enum.
-     */
-    enum HttpMethod {
-        OPTIONS,
-        GET,
-        HEAD,
-        POST,
-        PUT,
-        DELETE,
-        TRACE,
-        CONNECT,
-        PATCH,
-        OTHER;
-    }
-
-    /**
      * Proxy enum for <code>io.vertx.core.net.ProxyType</code> enum.
      */
     enum ProxyType {
diff --git a/docs/components/modules/ROOT/pages/vertx-component.adoc 
b/docs/components/modules/ROOT/pages/vertx-component.adoc
index babbecb..9fa13d5 100644
--- a/docs/components/modules/ROOT/pages/vertx-component.adoc
+++ b/docs/components/modules/ROOT/pages/vertx-component.adoc
@@ -66,7 +66,7 @@ The Vert.x component supports 9 options, which are listed 
below.
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *lazyStartProducer* (producer) | 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 [...]
 | *autowiredEnabled* (advanced) | 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. | true | boolean
-| *vertxFactory* (advanced) | To use a custom VertxFactory implementation |  | 
VertxFactory
+| *vertxFactory* (advanced) | To use a custom VertxFactory implementation |  | 
VertxBuilder
 |===
 // component options: END
 
diff --git a/docs/components/modules/ROOT/pages/vertx-http-component.adoc 
b/docs/components/modules/ROOT/pages/vertx-http-component.adoc
index b285f33..cd6a7ae 100644
--- a/docs/components/modules/ROOT/pages/vertx-http-component.adoc
+++ b/docs/components/modules/ROOT/pages/vertx-http-component.adoc
@@ -95,7 +95,7 @@ with the following path and query parameters:
 | *connectTimeout* (producer) | The amount of time in milliseconds until a 
connection is established. A timeout value of zero is interpreted as an 
infinite timeout. | 60000 | int
 | *cookieStore* (producer) | A custom CookieStore to use when session 
management is enabled. If this option is not set then an in-memory CookieStore 
is used | InMemoryCookieStore | CookieStore
 | *headerFilterStrategy* (producer) | A custom 
org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel 
message. | VertxHttpHeaderFilterStrategy | HeaderFilterStrategy
-| *httpMethod* (producer) | The HTTP method to use. The HttpMethod header 
cannot override this option if set. There are 10 enums and the value can be one 
of: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, PATCH, OTHER |  | 
HttpMethod
+| *httpMethod* (producer) | The HTTP method to use. The HttpMethod header 
cannot override this option if set |  | HttpMethod
 | *lazyStartProducer* (producer) | 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 [...]
 | *okStatusCodeRange* (producer) | The status codes which are considered a 
success response. The values are inclusive. Multiple ranges can be defined, 
separated by comma, e.g. 200-204,209,301-304. Each range must be a single 
number or from-to with the dash included | 200-299 | String
 | *responsePayloadAsByteArray* (producer) | Whether the response body should 
be byte or as io.vertx.core.buffer.Buffer | true | boolean
diff --git a/parent/pom.xml b/parent/pom.xml
index 3b967e5..d980562 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -547,7 +547,7 @@
         <vavr-version>0.10.2</vavr-version>
         <velocity-tools-version>3.1</velocity-tools-version>
         <velocity-version>2.3</velocity-version>
-        <vertx-version>3.9.6</vertx-version>
+        <vertx-version>4.0.3</vertx-version>
         <vysper-version>0.7</vysper-version>
         <web3j-version>3.6.0</web3j-version>
         <web3j-quorum-version>0.8.0</web3j-quorum-version>

Reply via email to