Eclipse Vert.x 3.9.0 released!

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

SQL Client fluent queries

The query API be­comes flu­ent with the ad­di­tion of a Query API for queries cre­ation and con­fig­u­ra­tion.

Col­lec­tors query now be­comes part of the Query in­ter­face.

This is a break­ing API change done under the tech pre­view sta­tus given that SQL client is a Vert.x 4 fea­ture back-​ported to Vert.x 3.

client.prepareQuery(sql).execute(tuple, ar -> ...);

// With a collector
client.preparedQuery(sql).collecting(Collectors.toList()).execute(tuple, ar -> ...);

You can read more about this new fea­ture here.

Redis client backport

For Vert.x 4.0 we are doing a full re­boot to the redis client. The func­tion­al­ity for the new client is ready to test on the mas­ter branch. In order to give users the op­por­tu­nity to test and make the up­com­ing client even bet­ter it has been back­ported to the 3.9.0 re­lease. The new client will allow users to con­nect to a sin­gle node, sen­tinel or clus­ter of redis nodes. The eas­i­est way to start is:

Redis.createClient(
      vertx,
      new RedisOptions()
        .setConnectionString("redis://localhost:7006"))
      .send(Request.cmd(Command.PING), send -> {
        if (send.succeeded()) {
          // Should have received a pong...
        }
      });

Same-site cookies

SameSite Cookie pol­icy has been added to the HTTP Server Cook­ies.

This is also ap­plic­a­ble to web which al­lows cookie ses­sions to use SameSite cook­ies:

SessionHandler.create(store)
  .setCookieSameSite(CookieSameSite.STRICT);

Same-​site cook­ies let servers re­quire that a cookie shouldn’t be sent with cross-​site (where Site is de­fined by the reg­is­tra­ble do­main) re­quests, which pro­vides some pro­tec­tion against cross-​site re­quest forgery at­tacks (CSRF).

Kafka client upgrade

The Kafka client has been up­graded to Kafka 2.4.0 .

Our re­ac­tive client ex­poses the Kafka Admin API. As of 2.4.0 this API has been re­placed by a new Kafka Admin API and there­fore the Vert.x Kafka Admin API changes, e.g list­ing con­sumers groups

adminClient.listConsumerGroups(ar -> {
    System.out.println("ConsumerGroups= " + ar.result());
});

Future API

With the re­cent ad­di­tion of Future#onComplete(...) sup­port­ing sev­eral han­dlers per Future in 3.9 made the Future#setHandler(...) method feel awk­ward. In­deed setHandler con­veys the mean­ing that the Future man­ages a sin­gle han­dler. In 3.9 we dep­re­cate Future#setHandler in favor of Future#onComplete.

EDNS disabled by default

EDNS is an ex­ten­sion mech­a­nism for DNS (https://fr.wikipedia.org/wiki/EDNS) that should be dis­abled by de­fault. It might cause un­wanted issue and should be dis­abled by de­fault.

Auth Deprecation warnings

As of 3.9.0 many APIs will be start warn­ing about dep­re­ca­tions. There is a big refac­tor­ing and some break­ing API changes com­ing on 4.0.0 and these warn­ings are just to give users a heads up that API will change on the up­com­ing ver­sion.

For more in­for­ma­tion about the up­com­ing 4.0 changes you can read 4.0.0-​Deprecations-and-breaking-changes

Dependency upgrades

In 3.9 we up­date a few ver­sions:

  • Netty 4.1.48.Final
  • Jack­son 2.10.2
  • Guava 25.1-jre
  • GraphQL Java 14

Finally

The 3.9.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 3.9.1 released!

The new version comes with many enhancements including an SQL client for DB2 and out-of-the-box support for HTTP/2 on JDK 8.

Read more
Previous post

Easy SSO for Vert.x with Keycloak

In this blog post, you'll learn how to implement Single Sign-on with OpenID Connect and how to use Keycloak together with Eclipse Vert.x.

Read more
Related posts

Eclipse Vert.x 3.7.0 released!

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

Read more

Building services and APIs with AMQP 1.0

Microservices and APIs are everywhere. Everyone talks about them, presentation slides are full of them ... some people are actually even building them.

Read more

Eclipse Vert.x meets GraphQL

In this blog post, we will look at an example application written in Vert.x that uses the new GraphQL API of Gentics Mesh.

Read more