Hi Julien, thanks for the help!
A simple verticle does the trick in my case:
```
public class TestVerticle1 extends AbstractVerticle {
private WebClient webClient;
@Override
public void start(Future<Void> startFuture) {
WebClientOptions webClientOptions = new WebClientOptions();
webClientOptions.setSsl(false);
webClientOptions.setConnectTimeout(5000);
// msec
webClientOptions.setIdleTimeout(30);
// sec
webClient = WebClient.
create(vertx, webClientOptions);
vertx.eventBus().consumer("TEST", t -> {
Future<HttpResponse<Buffer>> future = Future.
future();
webClient.get(8080, "
http://localhost", "/").send(future);
System.
out.println("This thread called is creating the http request: " + Thread.
currentThread());
future.setHandler(r -> {
System.
out.println("This thread is handling the http response: " + Thread.
currentThread());
System.
out.println(r);
});
});
vertx.setTimer(1000L, t -> {
vertx.eventBus().send("TEST", "");
});
}
}
```
This will print:
This thread called is creating the http request: Thread[vert.x-worker-thread-11,5,main]
This thread is handling the http response: Thread[vert.x-worker-thread-12,5,main]
That Verticle was initiated as a worker verticle:
```
Vertx.clusteredVertx(options, res -> {
if (res.succeeded()) {
Vertx vertx = res.result();
vertx.deployVerticle(new TestVerticle1(), new DeploymentOptions().setWorker(true), result -> {
if (result.succeeded()) {
LOGGER.info("AccountVerticle deployment complete.");
} else {
LOGGER.error("AccountVerticle deployment failed!", result.cause());
}
});
} else {
// failed!
LOGGER.error("Vert.x cluster manager start failed", res.cause());
}
});
```
I attach the code in case needed.