Eclipse Vert.x 3.8.0 released!

We are ex­tremely pleased to an­nounce that the Eclipse Vert.x ver­sion 3.8.0 has been re­leased.

This is an im­por­tant re­lease that in­tro­duces a few changes ramp­ing up to Vert.x 4 ex­pected by the end of this year.

The Reactive SQL Client

The client is the evo­lu­tion of the leg­endary Re­ac­tive Post­greSQL Client and pro­vides

  • The Re­ac­tive Post­greSQL Client aka Vert.x Post­greSQL Client
  • The Re­ac­tive MySQL Client aka Vert.x MySQL Client

These im­ple­men­ta­tions pro­vide real high per­for­mance non-​blocking ac­cess to Post­greSQL and MySQL.

To use these new mod­ules, add the fol­low­ing to the de­pen­den­cies sec­tion 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 Gra­dle:

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());
  }
});

Like­wise 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 Re­ac­tive SQL Client brings to you the next gen­er­a­tion data­base ac­cess, it is cer­tainly the most ex­cit­ing thing hap­pen­ing in the re­ac­tive data­base ac­cess space.

Future API improvements

In this re­lease we up­dated the Vert.x Future in­ter­face to ex­pose com­ple­tion meth­ods in a new Promise in­ter­face.

This im­proves the de­sign of the API of Future by hav­ing Promise being the write side of an asyn­chro­nous re­sult and the Future being its read side.

While there is lit­tle use for this in Vert.x 3.x, this has an im­pact on Vert.x 4.

Con­se­quently some method sig­na­tures have been changed to use Promise in­stead of Future ex­plained in this page.

Upgrading to 3.8

Up­grad­ing to 3.8.0 might re­quire a few changes in your ap­pli­ca­tion, you can read this page to un­der­stand the im­pact of the 3.8 re­lease on your ap­pli­ca­tion up­grade.

And more…

Here are some other im­por­tant im­prove­ments you can find in this re­lease:

  • Cas­san­dra Client gets out of tech pre­view
  • Jack­son up­grade to 2.9.9 and data­bind 2.9.9.1
  • And ob­vi­ously we have the usual bug fixes!

Finally

The 3.8.0 re­lease notes can be found on the wiki, as well as the list of dep­re­ca­tions and break­ing changes

Docker im­ages are avail­able on Docker Hub.

The Vert.x dis­tri­b­u­tion can be down­loaded on the web­site but is also avail­able from SD­KMan and Home­Brew.

The event bus client using the SockJS bridge is avail­able from:

The re­lease ar­ti­facts have been de­ployed to Maven Cen­tral and you can get the dis­tri­b­u­tion on Bin­tray.

That’s it! Happy cod­ing and see you soon on our user or dev chan­nels.

Next post

Eclipse Vert.x 4 milestone 1 released!

This is the first milestone of the upcoming Vert.x 4. It extends the 3.x callback asynchronous model to a future/callback hybrid model and introduces a Tracing API.

Read more
Previous post

VS Code Vert.x Starter Extension

Today, we are really excited to announce the Visual Studio Code Vert.x Starter extension. It allows you to create a Vert.x project, customize the creation, and search for dependencies.

Read more
Related posts

Using the asynchronous SQL client

Finally, back... This post is the fifth post of the introduction to vert.x blog series, after a not-that-small break. In this post we are going to see how we can use JDBC in a vert.x application.

Read more

Some Rest with Vert.x

This post is part of the Introduction to Vert.x series. Let’s go a bit further this time and develop a CRUD-ish application

Read more

Checklist for Migrating from Vert.x 2.1.x to Vert.x 3 - Part One

So while upgrading our application, I thought I should note down all the changes that we had to do in the process. Since Vert.x 3 is a major upgrade from the previous version, with so many changes.

Read more