Let me outline the important changes you can already find in this Beta1.
Vert.x Web Client
In a simple sentence “Vert.x Web Client is to Vert.x HttpClient what Vert.x Web is to HttpServer”
The Web Client makes it easy to do HTTP request/response interactions with a web server, and provides advanced features like:
Json body encoding / decoding
request/response pumping
request parameters
unified error handling
form submissions
and more!
Built on top of HttpClient, it naturally inherits its features and provides a better API, let me give an overview in one example:
RxJava singles
RxJava is a very popular Java extension and in this release we focused on the API usability with the support
of the Single RxJava type.
The new methods are prefixed by rx and deprecates the Observable suffixed methods.
So instead of starting a server with listenObservable now you use rxListen:
One noticeable difference with the previous API, is that the listen method is called when the Single is subscribed.
This is very handy when combined with the new web client:
Polyglot
In this beta you can try Vert.x for Kotlin.
Vert.x for Kotlin is based on the Java API and provides also the execution of Kotlin Verticles.
It can be directly ran from the command line:
As you can see, Kotlin is using the Java API directly, and we thought that it might be a cool thing to do the
same with Groovy support. So we have reconsidered our Groovy support and now it uses the plain Java API,
without losing the existing features.
Thanks to Groovy extension methods, idiomatic Groovy is still supported while benefiting from the full Java API!
Scala support is also planned for 3.4.0 and will be released soon, watch @vertx_project.
The microservices story goes on…
Our APIs have matured and now they have been moved out of tech preview, of course this wasn’t enough and we now
have Vert.x Config, an extensible way to configure Vert.x applications supporting File, json, ENV, system properties,
HTTP, Kubernetes Configmap, Consul, Spring Config Server, Redis, Git, Zookeeper, … stores as well as
several formats: properties file, YAML and Hocon.
Here is a small example:
Vert.x Config also supports push based notification style:
Vertx MQTT Server
Vert.x MQTT Server is able to handle connections, communication and messages exchange with remote MQTT clients.
Its API provides a bunch of events related to protocol messages received by clients and exposes allow to send
messages to them.
Here is a small effective example of creating, the Vert.x way!
Vert.x SQL streaming
We now support streaming style for SQL queries:
And with the RxJava API:
Finally
In addition to all these brillant features here is a list of more-than-noticeable things you have in this Beta1:
Last but not least, I want to personally thank all the people that contributed to this release, beyond the Vert.x core team, the actual
Vert.x committers and many other people who have given a lot of effort to this upcoming 3.4.0!!!!