Skip to content

Vert.x 5 update #460

Closed
Closed
@vietj

Description

@vietj

Considerations:

  • convert AbstractVerticle to VerticleBase
  • use test containers whenever possible : Mongo / Cassandra / ...
  • refresh
    • Web Client Twitter Oauth example
    • ...
  • cleanups
    • Gradle
    • vertx-unit examples
    • vertx-proton examples
  • missing examples
    • service resolver examples
    • AMQP client examples
    • JSON schema examples
    • Web Client URI template
    • Per db client
    • Sql Client templates
    • HTTP Proxy
    • Unpooled HTTP connections
    • TCP shutdown (graceful HTTP server shutdown)
    • STOMP
    • OTEL
    • Healthchecks
    • Config
    • Circuit breaker
    • Auth we have several auth examples under the vertx-web section

See

Server verticle

  • rely on the launcher to print the verticle deployment failure
// 4.x

public static void main(String[] args) {
  VertxApplication.main(new String[]{Server.class.getName()});
}

...

public void start() {
  ...
  server.listen().onComplete(ar -> {
    if (ar.succeeded()) {
      System.out.println("Server started");
    } else {
      System.out.println("Server listen failed " + ar.cause().getMessage());
    }
  });
}
// 5.0

public static void main(String[] args) {
  VertxApplication.main(new String[]{Server.class.getName()});
  System.out.println("Server started");
}

...

public Future<?> start() {
  ...
  return server.listen();
}

Client verticle

  • rely on the launcher to print the verticle deployment failure
// 4.x

public void start() {
  ...
  return client.asyncInteraction()
    .onSuccess(response -> System.out.println("Got response"))
   .onFailure(error -> System.out.println("Failed" + error.getMessage()));
}
// 5.0

public Future<?> start() {
  ...
  return client.asyncInteraction()
    .onSuccess(response -> System.out.println("Got response"));
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions