What's new in Vert.x 4.2
Vert.x 4.2 comes with plenty of new exciting features.
Here is an overview of the most important features supported in Vert.x 4.2.
Java 17
Vert.x 4.2 comes with official support of Java 17.
Our CI has been updated to test from our Java 8 baseline to the very recent Java 17 release.
Reactive SQL Clients
Oracle client
The Reactive Oracle Client joins the database clients family!
This client is in tech preview and we are eager to hear any feedback you may have.
Microsoft SQL Server client
Encryption
The Reactive SQL Server Client is able to negotiate the encryption level when a connection is established:
- no encryption
- encrypt login packet only
- encrypt entire connection
Azure SQL Database
Our client is now able to connect to Azure SQL Database servers.
This was made possible thanks to:
- encryption support (see above)
- enhancements in the protocol implementation (TDS
ENV_CHANGE
ROUTING
token support)
MQTT Server V5 support
The MQTT Server has been upgraded to support the version 5 of the protocol partially (the auth message remains to be implemented).
Cassandra Client
The Cassandra Client can trace query execution when Vert.x has tracing enabled.
The client reports the following client spans:
Query
operation name- tags
peer.address
: list of nodes known to the driver, in the form[127_0_0_1:9042,localhost:9042,myhost_mydomain:9042]
span.kind
:client
db.instance
: the keyspacedb.statement
: the CQL querydb.type
:cassandra
Web Client enhancements
Our Web Client supports now Oauth2 automated token security management.
Tokens are now fetched or refreshed during the lifecycle of the client.
It also offers an HTTP response caching facility.
Auth enhancements
Webauthn
Webauthn now supports MDS3. The now “legacy” MDS2 is still available as the service is expected to be running until Nov 2022. In terms of usage, nothing changed, the module can identify the metadata version from the payload and decide how to handle it internally.
OTP
A new module and handler for 2nd factor authentication is now available:
This module and handler are compatible with google authenticator and similar apps.
OpenAPI
When using OpenAPI and eventbus deployed services, when deploying secure APIs, the HTTP Authorization
header is now propagated along with the request all the way with the request on the eventbus. This paves the way to create a Zero Trust
foundation for vert.x distributed applications.
Redis Client
Redis client now support REPLICATION
mode. This mode is commonly used by cloud providers like Azure and AWS. The client will act just like in a clustered mode, with less overhead as the hosting will perform most of the clustered tasks, not the client.
Vert.x Web GraphQL
Context Management
Vert.x Web GraphQL has been upgraded to GraphQL-Java version 17.
In this version, the GraphQLContext
object becomes the standard to share contextual data between components of a GraphQL Java application (see v17 Release Notes).
Consequently, we have:
- deprecated the existing context hooks in Vert.x Web GraphQL handlers
- created new hooks (e.g. GraphQLHandler beforeExecute) for context management
GraphQL over Websockets protocol
The Apollo subscriptions-transport-ws
library is not being actively maintained.
It is recommended that you use the graphql-ws
in your client applications library instead.
For this purpose, Vert.x Web GraphQL supports the GraphQL over Websockets protocol.
For details about it, please read the GraphQL over WebSockets announcement.
Vert.x JUnit 5
By default the thread invoking the test methods is the JUnit thread.
The io.vertx.junit5.RunTestOnContext
extension can be used to alter this behavior by running test methods on a Vert.x event-loop thread.