Repository: quarkusio/quarkus
Issue: quarkus.vertx.max-worker-execute-time not picking up

**Describe the bug**
The property `quarkus.vertx.max-worker-execute-time` is not recognized by the quarkus application.

**Expected behavior**
I would expect to see a the configuted value as time limit  in the logs of the quarkus application.

**Actual behavior**
Still getting the warning with the default (?) value of 60000ms. 
```
2019-11-04 15:13:56,641 WARNING [io.ver.cor.imp.BlockedThreadChecker] (vertx-blocked-thread-checker) Thread Thread[vert.x-worker-thread-5,5,main]=Thread[vert.x-worker-thread-5,5,main] has been blocked for 78245 ms, time limit is 60000 ms:

```

**To Reproduce**
Steps to reproduce the behavior:
1. build a 'standard app' 
2. add the mentioned property
3. try to run in a timeout 

**Configuration**
```properties
# Add your application.properties here, if applicable.
#quarkus.vertx.max-worker-execute-time=100
quarkus.vertx.max-worker-execute-time=100s
```

**Screenshots**
(If applicable, add screenshots to help explain your problem.)

**Environment (please complete the following information):**
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

quarkus: 0.27.0

**Additional context**
(Add any other context about the problem here.)


Changed files:
extensions/vertx/runtime/src/main/java/io/quarkus/vertx/runtime/VertxRecorder.java
extensions/vertx-core/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxOptionsBuilder.java
extensions/vertx-core/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java

diff --git a/extensions/vertx-core/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java b/extensions/vertx-core/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java
index d86ffbe4544..e6af79f7d06 100644
--- a/extensions/vertx-core/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java
+++ b/extensions/vertx-core/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java
@@ -3,10 +3,13 @@
 import static io.vertx.core.file.impl.FileResolver.CACHE_DIR_BASE_PROP_NAME;
 
 import java.io.File;
+import java.time.Duration;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Optional;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.function.Supplier;
 import java.util.regex.Pattern;
@@ -143,16 +146,27 @@ private static VertxOptions convertToVertxOptions(VertxConfiguration conf) {
                 .setFileCacheDir(fileCacheDir)
                 .setClassPathResolvingEnabled(conf.classpathResolving));
         options.setWorkerPoolSize(conf.workerPoolSize);
-        options.setBlockedThreadCheckInterval(conf.warningExceptionTime.toMillis());
         options.setInternalBlockingPoolSize(conf.internalBlockingPoolSize);
+
+        options.setBlockedThreadCheckInterval(conf.warningExceptionTime.toMillis());
         if (conf.eventLoopsPoolSize.isPresent()) {
             options.setEventLoopPoolSize(conf.eventLoopsPoolSize.getAsInt());
         } else {
             options.setEventLoopPoolSize(calculateDefaultIOThreads());
         }
-        // TODO - Add the ability to configure these times in ns when long will be supported
-        //  options.setMaxEventLoopExecuteTime(conf.maxEventLoopExecuteTime)
-        //         .setMaxWorkerExecuteTime(conf.maxWorkerExecuteTime)
+
+        Optional<Duration> maxEventLoopExecuteTime = conf.maxEventLoopExecuteTime;
+        if (maxEventLoopExecuteTime.isPresent()) {
+            options.setMaxEventLoopExecuteTime(maxEventLoopExecuteTime.get().toMillis());
+            options.setMaxEventLoopExecuteTimeUnit(TimeUnit.MILLISECONDS);
+        }
+
+        Optional<Duration> maxWorkerExecuteTime = conf.maxWorkerExecuteTime;
+        if (maxWorkerExecuteTime.isPresent()) {
+            options.setMaxWorkerExecuteTime(maxWorkerExecuteTime.get().toMillis());
+            options.setMaxWorkerExecuteTimeUnit(TimeUnit.MILLISECONDS);
+        }
+
         options.setWarningExceptionTime(conf.warningExceptionTime.toNanos());
 
         return options;
diff --git a/extensions/vertx-core/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxOptionsBuilder.java b/extensions/vertx-core/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxOptionsBuilder.java
deleted file mode 100644
index 5099fdec8fe..00000000000
--- a/extensions/vertx-core/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxOptionsBuilder.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package io.quarkus.vertx.core.runtime;
-
-import static io.vertx.core.file.impl.FileResolver.CACHE_DIR_BASE_PROP_NAME;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-
-import io.quarkus.vertx.core.runtime.config.ClusterConfiguration;
-import io.quarkus.vertx.core.runtime.config.EventBusConfiguration;
-import io.quarkus.vertx.core.runtime.config.VertxConfiguration;
-import io.vertx.core.VertxOptions;
-import io.vertx.core.eventbus.EventBusOptions;
-import io.vertx.core.file.FileSystemOptions;
-import io.vertx.core.http.ClientAuth;
-import io.vertx.core.net.JksOptions;
-import io.vertx.core.net.PemKeyCertOptions;
-import io.vertx.core.net.PemTrustOptions;
-import io.vertx.core.net.PfxOptions;
-
-public class VertxOptionsBuilder {
-
-    private static final Pattern COMMA_PATTERN = Pattern.compile(",");
-
-    static VertxOptions buildVertxOptions(VertxConfiguration conf) {
-        VertxOptions options = new VertxOptions();
-
-        // Order matters, as the cluster options modifies the event bus options.
-        buildEventBusOptions(conf, options);
-        buildClusterOptions(conf, options);
-        buildFileSystemOptions(conf, options);
-
-        options.setWorkerPoolSize(conf.workerPoolSize);
-        options.setInternalBlockingPoolSize(conf.internalBlockingPoolSize);
-
-        options.setBlockedThreadCheckInterval(conf.warningExceptionTime.toMillis());
-        options.setWarningExceptionTime(conf.warningExceptionTime.toNanos());
-        conf.maxEventLoopExecuteTime.ifPresent(d -> options.setMaxEventLoopExecuteTime(d.toMillis()));
-        conf.maxWorkerExecuteTime.ifPresent(d -> options.setMaxWorkerExecuteTime(d.toMillis()));
-
-        conf.eventLoopsPoolSize.ifPresent(options::setEventLoopPoolSize);
-
-        return options;
-    }
-
-    private static void buildFileSystemOptions(VertxConfiguration conf, VertxOptions options) {
-        String fileCacheDir = System.getProperty(CACHE_DIR_BASE_PROP_NAME,
-                System.getProperty("java.io.tmpdir", ".") + File.separator + "quarkus-vertx-cache");
-
-        options.setFileSystemOptions(new FileSystemOptions()
-                .setFileCacheDir(fileCacheDir)
-                .setFileCachingEnabled(conf.caching)
-                .setClassPathResolvingEnabled(conf.classpathResolving));
-    }
-
-    private static void buildClusterOptions(VertxConfiguration conf, VertxOptions options) {
-        ClusterConfiguration cluster = conf.cluster;
-        EventBusOptions eb = options.getEventBusOptions();
-        eb.setClustered(cluster.clustered);
-        eb.setClusterPingReplyInterval(cluster.pingReplyInterval.toMillis());
-        eb.setClusterPingInterval(cluster.pingInterval.toMillis());
-        if (cluster.host != null) {
-            eb.setHost(cluster.host);
-        }
-        cluster.port.ifPresent(eb::setPort);
-        cluster.publicHost.ifPresent(eb::setClusterPublicHost);
-        cluster.publicPort.ifPresent(eb::setClusterPublicPort);
-    }
-
-    private static void buildEventBusOptions(VertxConfiguration conf, VertxOptions options) {
-        EventBusConfiguration eb = conf.eventbus;
-        EventBusOptions opts = new EventBusOptions();
-        opts.setAcceptBacklog(eb.acceptBacklog.orElse(-1));
-        opts.setClientAuth(ClientAuth.valueOf(eb.clientAuth.toUpperCase()));
-        opts.setConnectTimeout((int) (Math.min(Integer.MAX_VALUE, eb.connectTimeout.toMillis())));
-        opts.setIdleTimeout(
-                eb.idleTimeout.map(d -> Math.max(1, (int) Math.min(Integer.MAX_VALUE, d.getSeconds()))).orElse(0));
-        opts.setSendBufferSize(eb.sendBufferSize.orElse(-1));
-        opts.setSoLinger(eb.soLinger.orElse(-1));
-        opts.setSsl(eb.ssl);
-        opts.setReceiveBufferSize(eb.receiveBufferSize.orElse(-1));
-        opts.setReconnectAttempts(eb.reconnectAttempts);
-        opts.setReconnectInterval(eb.reconnectInterval.toMillis());
-        opts.setReuseAddress(eb.reuseAddress);
-        opts.setReusePort(eb.reusePort);
-        opts.setTrafficClass(eb.trafficClass.orElse(-1));
-        opts.setTcpKeepAlive(eb.tcpKeepAlive);
-        opts.setTcpNoDelay(eb.tcpNoDelay);
-        opts.setTrustAll(eb.trustAll);
-
-        // Certificates and trust.
-        if (eb.keyCertificatePem != null) {
-            List<String> certs = new ArrayList<>();
-            List<String> keys = new ArrayList<>();
-            eb.keyCertificatePem.certs.ifPresent(
-                    s -> certs.addAll(COMMA_PATTERN.splitAsStream(s).map(String::trim).collect(Collectors.toList())));
-            eb.keyCertificatePem.keys.ifPresent(
-                    s -> keys.addAll(COMMA_PATTERN.splitAsStream(s).map(String::trim).collect(Collectors.toList())));
-            PemKeyCertOptions o = new PemKeyCertOptions()
-                    .setCertPaths(certs)
-                    .setKeyPaths(keys);
-            opts.setPemKeyCertOptions(o);
-        }
-
-        if (eb.keyCertificateJks != null) {
-            JksOptions o = new JksOptions();
-            eb.keyCertificateJks.path.ifPresent(o::setPath);
-            eb.keyCertificateJks.password.ifPresent(o::setPassword);
-            opts.setKeyStoreOptions(o);
-        }
-
-        if (eb.keyCertificatePfx != null) {
-            PfxOptions o = new PfxOptions();
-            eb.keyCertificatePfx.path.ifPresent(o::setPath);
-            eb.keyCertificatePfx.password.ifPresent(o::setPassword);
-            opts.setPfxKeyCertOptions(o);
-        }
-
-        if (eb.trustCertificatePem != null) {
-            eb.trustCertificatePem.certs.ifPresent(s -> {
-                PemTrustOptions o = new PemTrustOptions();
-                COMMA_PATTERN.splitAsStream(s).map(String::trim).forEach(o::addCertPath);
-                opts.setPemTrustOptions(o);
-            });
-        }
-
-        if (eb.trustCertificateJks != null) {
-            JksOptions o = new JksOptions();
-            eb.trustCertificateJks.path.ifPresent(o::setPath);
-            eb.trustCertificateJks.password.ifPresent(o::setPassword);
-            opts.setTrustStoreOptions(o);
-        }
-
-        if (eb.trustCertificatePfx != null) {
-            PfxOptions o = new PfxOptions();
-            eb.trustCertificatePfx.path.ifPresent(o::setPath);
-            eb.trustCertificatePfx.password.ifPresent(o::setPassword);
-            opts.setPfxTrustOptions(o);
-        }
-        options.setEventBusOptions(opts);
-    }
-}
diff --git a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/runtime/VertxRecorder.java b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/runtime/VertxRecorder.java
index af047494241..f2e12b96710 100644
--- a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/runtime/VertxRecorder.java
+++ b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/runtime/VertxRecorder.java
@@ -161,11 +161,6 @@ private void registerCodecs(Map<Class<?>, Class<?>> codecByClass) {
         }
     }
 
-    private void registerCodec(Class<?> typeToAdd, MessageCodec codec) {
-        EventBus eventBus = vertx.eventBus();
-        eventBus.registerDefaultCodec(typeToAdd, codec);
-    }
-
     public RuntimeValue<Vertx> forceStart(Supplier<Vertx> vertx) {
         return new RuntimeValue<>(vertx.get());
     }