Closed cescoffier closed 3 years ago
@Override public Future<Void> close(long timeout) { ContextInternal ctx = (ContextInternal) vertx.getOrCreateContext(); Promise<Void> promise = ctx.promise(); ctx.executeBlocking(prom -> { if (timeout > 0) { adminClient.close(Duration.ofMillis(timeout)); } else { adminClient.close(); } prom.complete(); }); return promise.future(); }
The executeBlocking to not report the completion on the right promise.
executeBlocking
This is blocking the integration of Vert.x 4 in SmallRye Reactive Messaging and so Quarkus.
Also, it needs to handle failure (as close may fail in some rare situations).
The
executeBlocking
to not report the completion on the right promise.