Skip to main content

Eclipse Vert.x 3.8.0 released!

We are extremely pleased to announce that the Eclipse Vert.x version 3.8.0 has been released.

This is an important release that introduces a few changes ramping up to Vert.x 4 expected by the end of this year.

The Reactive SQL Client

The client is the evolution of the legendary Reactive PostgreSQL Client and provides

  • The Reactive PostgreSQL Client aka Vert.x PostgreSQL Client
  • The Reactive MySQL Client aka Vert.x MySQL Client

These implementations provide real high performance non-blocking access to PostgreSQL and MySQL.

To use these new modules, add the following to the dependencies section of your Maven POM file:

<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-pg-client</artifactId>
  <version>3.8.0</version>
</dependency>
<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-mysql-client</artifactId>
  <version>3.8.0</version>
</dependency>

Or, if you use Gradle:

compile 'io.vertx:vertx-pg-client:3.8.0'
compile 'io.vertx:vertx-mysql-client:3.8.0'

Then you are good to go!

// Connect options
PgConnectOptions connectOptions = new PgConnectOptions()
  .setPort(5432)
  .setHost("the-host")
  .setDatabase("the-db")
  .setUser("user")
  .setPassword("secret");

PgPool client = PgPool.pool(connectOptions, new PoolOptions().setMaxSize(5));

client.query("SELECT * FROM users WHERE id='julien'", ar -> {
  if (ar.succeeded()) {
    RowSet result = ar.result();
    System.out.println("Got " + result.size() + " rows ");
  } else {
    System.out.println("Failure: " + ar.cause().getMessage());
  }
});

Likewise you can achieve the same for MySQL:

MySQLConnectOptions connectOptions = new MySQLConnectOptions()
  .setPort(3306)
  .setHost("the-host")
  .setDatabase("the-db")
  .setUser("user")
  .setPassword("secret");

MySQLPool client = MySQLPool.pool(connectOptions, new PoolOptions().setMaxSize(5));

client.query("SELECT * FROM users WHERE id='julien'", ar -> {
  if (ar.succeeded()) {
    RowSet result = ar.result();
    System.out.println("Got " + result.size() + " rows ");
  } else {
    System.out.println("Failure: " + ar.cause().getMessage());
  }
});

The Reactive SQL Client brings to you the next generation database access, it is certainly the most exciting thing happening in the reactive database access space.

Future API improvements

In this release we updated the Vert.x Future interface to expose completion methods in a new Promise interface.

This improves the design of the API of Future by having Promise being the write side of an asynchronous result and the Future being its read side.

While there is little use for this in Vert.x 3.x, this has an impact on Vert.x 4.

Consequently some method signatures have been changed to use Promise instead of Future explained in this page.

Upgrading to 3.8

Upgrading to 3.8.0 might require a few changes in your application, you can read this page to understand the impact of the 3.8 release on your application upgrade.

And more…

Here are some other important improvements you can find in this release:

  • Cassandra Client gets out of tech preview
  • Jackson upgrade to 2.9.9 and databind 2.9.9.1
  • And obviously we have the usual bug fixes!

Finally

The 3.8.0 release notes can be found on the wiki, as well as the list of deprecations and breaking changes

Docker images are available on Docker Hub.

The Vert.x distribution can be downloaded on the website but is also available from SDKMan and HomeBrew.

The event bus client using the SockJS bridge is available from:

The release artifacts have been deployed to Maven Central and you can get the distribution on Bintray.

That’s it! Happy coding and see you soon on our user or dev channels.