Skip to content

4.5.4 Deprecations and breaking changes

Julien Viet edited this page Feb 20, 2024 · 5 revisions

Vert.x Core

Breaking change in the TLS configuration of TCP client

https://github.com/eclipse-vertx/vert.x/pull/5117

The TLS configuration of the NetClient does not set anymore the default hostname verification algorithm to the empty string, instead the user of the client must explicitly configure the hostname verification algorithm with a non null string.

// Before
NetClient client = vertx.createNetClient(new NetClientOptions().setSsl(true).setTrustOptions(trustedCert));

// After 
String algo = ...;
NetClient client = vertx.createNetClient(new NetClientOptions().setSsl(true).setHostnameVerificationAlgorithm(algo).setTrustOptions(trustedCert));

The verification algorithm can be one of

  • "": accept any trusted certificate
  • "HTTPS": verifies any trusted certificate as per rfc2818
  • "LDAPS": verifies any trusted certificate as per rfc2830

As consequence the Vert.x Redis Client TLS configuration must explicitly set the algorithm on the TCP client options.

// Before
redisOptions.setNetClientOptions(new NetClientOptions().setSsl(true).setTrustOptions(cert));

// After
redisOptions.setNetClientOptions(new NetClientOptions().setSsl(true).setTrustOptions(cert).setHostnameVerificationAlgorithm(algo));

As consequence the Vert.x MQTT Client TLS configuration must explicitly set the algorithm on the MQTT client options.

// Before
mqttClientOptions.setSsl(true).setTrustOptions(cert);

// After
mqttClientOptions.setSsl(true).setTrustOptions(cert).setHostnameVerificationAlgorithm(algo);

Deprecation of HTTP connection shutdown with a timeout

https://github.com/eclipse-vertx/vert.x/pull/5115

Deprecate HttpConnection#timeout(long), replaced by HttpConnection#timeout(long, TimeUnit)

// Before
connection.shutdown(5 * 1000); // 5 seconds

// After
connection.shutdown(5, TimeUnit.SECONDS);
Clone this wiki locally