此内容没有您所选择的语言版本。
Release Notes for Eclipse Vert.x 3.9
For use with Eclipse Vert.x 3.9.6
Abstract
Preface 复制链接链接已复制到粘贴板!
Date of release: 2021-03-11
Red Hat build of Eclipse Vert.x 3.9 - End of Life 复制链接链接已复制到粘贴板!
The Red Hat build of Eclipse Vert.x 3.9 is the last supported release of the major version 3.x. The full support life cycle of Eclipse Vert.x 3.x version ends on March 31, 2021. See the product life cycle page for details.
It is recommended that you migrate your applications to Red Hat build of Eclipse Vert.x 4.
See the Eclipse Vert.x 4 documentation for more information.
The Eclipse Vert.x 4.0 Migration Guide provides information on how to upgrade your Eclipse Vert.x 3.x applications to Eclipse Vert.x 4.
Providing feedback on Red Hat documentation 复制链接链接已复制到粘贴板!
We appreciate your feedback on our documentation. To provide feedback, you can highlight the text in a document and add comments.
This section explains how to submit feedback.
Prerequisites
- You are logged in to the Red Hat Customer Portal.
- In the Red Hat Customer Portal, view the document in Multi-page HTML format.
Procedure
To provide your feedback, perform the following steps:
Click the Feedback button in the top-right corner of the document to see existing feedback.
NoteThe feedback feature is enabled only in the Multi-page HTML format.
- Highlight the section of the document where you want to provide feedback.
Click the Add Feedback pop-up that appears near the highlighted text.
A text box appears in the feedback section on the right side of the page.
Enter your feedback in the text box and click Submit.
A documentation issue is created.
- To view the issue, click the issue tracker link in the feedback view.
Chapter 1. Required Infrastructure Component Versions 复制链接链接已复制到粘贴板!
Red Hat does not provide support for components listed below, with the exception of components explicitly designated as supported.
| Component name | Version |
|---|---|
| Maven | 3.6.0 |
| Fabric8 Maven Plugin | 4.4.1 |
| OpenJDK 8, OpenJDK 11[c] | |
| Red Hat Enterprise Linux 7[d] | 7.7 |
| Red Hat Enterprise Linux 8[e] | 8.1 |
| OpenShift Container Platform (OCP)[f] | 3.11, 4.6, 4.7 |
| Minishift | 1.34.2 or later |
| CDK[g] | 3.11.0 |
| git | 2.0 or later |
| oc command line tool | 3.11 or later[h] |
[a]
A full JDK installation is required, as JRE does not provide tools for compiling Java applications from source.
[b]
Red Hat OpenJDK is supported by Red Hat.
[c]
Red Hat supports only LTS releases of JDK.
[d]
For deploying applications based on CNR on stand-alone RHEL in a production environment.
[e]
For deploying applications based on CNR on stand-alone RHEL in a production environment.
[f]
OCP is supported by Red Hat
[g]
CDK is supported by Red Hat
[h]
The version of the oc CLI tool should correspond to the version of OCP that you are using.
| |
The following resource defines the supported configurations and integrations of Red Hat products with Eclipse Vert.x:
- For a list of technologies that are supported for integration with Eclipse Vert.x in production environments see the Supported Eclipse Vert.x configurations and integrations.
- For a list of Eclipse Vert.x runtime artifacts and their versions see the component details page.
Chapter 3. Features 复制链接链接已复制到粘贴板!
3.1. New and Changed features 复制链接链接已复制到粘贴板!
This section describes the new functionalities introduced in this release. It also contains information about changes in the existing functionalities.
3.1.1. Changes in EventBus JavaScript client 复制链接链接已复制到粘贴板!
The following section explains the changes in EventBus JavaScript client.
In releases before Eclipse Vert.x 3.9.5, the event bus JavaScript client was available in various locations, such as Maven Central, NPM, and so on.
From Eclipse Vert.x 3.9.5, the EventBus JavaScript client module is available in a new npm location. The client is not available in other locations. You should update your build systems to use the module from the following new location.
3.1.1.2. Versioning of JavaScript client 复制链接链接已复制到粘贴板!
In releases before Eclipse Vert.x 3.9.5, every Eclipse Vert.x release included a new release of the JavaScript client.
However, from Eclipse Vert.x 3.9.5 onward, a new version of JavaScript client will be available in npm only if there changes in the client. You do not need to update your client application for every Eclipse Vert.x release, unless there is a version change.
The value accessor methods in Row and Tuple throw exceptions instead of returning null for invalid values.
-
The methods in
Rowthrows theNoSuchElementExceptionwhen a lookup for a given column does not exist. -
The methods in
RowandTuplethrow theClassCastExceptionwhen the returned value cannot be casted or coerced to the expected type.
The prepared statements that are created using the SqlConnection.Prepare method are no longer cached internally. If you want to cache the prepared statements, you must set up the caching.
The PgConnection.Prepare method creates a named prepared statement. In the previous releases, the method created unnamed prepared statements.
The Red Hat build of Eclipse Vert.x for s390x and ppc64le platforms is supported only in OpenShift environments provisioned on IBM Z and IBM Power Systems infrastructure. Running an Eclipse Vert.x application on a stand-alone installation of RHEL on IBM Z and IBM Power Systems is not supported.
Eclipse OpenJ9 Java images for IBM Z, IBM Power Systems and new images for products supported on IBM Z and IBM Power Systems are available in the Red Hat Ecosystem Catalog.
To deploy the example applications on OpenShift environments provisioned on IBM Z and IBM Power Systems infrastructure, specify the relevant IBM Z or IBM Power Systems image name in the pom.xml file and commands.
Some of the example applications also require other products, such as Red Hat Data Grid to demonstrate the workflows. In this case, you must also change the image names of these products to their relevant IBM Z or IBM Power Systems image names in the YAML file of the example applications.
3.1.8. Fluent Query Method 复制链接链接已复制到粘贴板!
The new class Query is a fluent API. It enables you to create and configure queries before their execution. All the query collectors are available in the Query interface.
The new class PreparedStatement enables you to create and execute prepared statements. The prepared statements can execute multiple interactions such as cursor or stream operations.
The existing class PreparedQuery extends the new class Query. The class can now be used outside the context of the connection.
For example, use the following sample codes to create queries:
Collector Query
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Prepared query
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2. Deprecated features 复制链接链接已复制到粘贴板!
The following functionalities have been deprecated in this release.
The MqttClientOptions.getKeepAliveTimeSeconds() and MqttClientOptions.setKeepAliveTimeSeconds() methods have been deprecated. Use the MqttClientOptions.getKeepAliveInterval() and MqttClientOptions.setKeepAliveInterval() methods instead to get and set the keep alive interval in seconds.
The HttpServerRequest.netSocket() method has been deprecated. Use the new method HttpServerRequest.toNetSocket() instead to establish a TCP tunnel with the client.
The following example shows you how the deprecated method HttpServerRequest.netSocket() was used.
NetSocket sock = request.netSocket();
NetSocket sock = request.netSocket();
The following example shows you how to use the new method HttpServerRequest.toNetSocket().
request.response().toNetSocket(ar -> {
if (ar.succeeded()) {
NetSocket sock = ar.result();
}
request.response().toNetSocket(ar -> {
if (ar.succeeded()) {
NetSocket sock = ar.result();
}
The HttpServerRequest.upgrade() method has been deprecated. Use the new method HttpServerResponse.toWebSocket() instead to upgrade the connection of the current request to a WebSocket.
The following example shows you how the deprecated method HttpServerRequest.upgrade() was used.
ServerWebSocket ws = request.upgrade();
ServerWebSocket ws = request.upgrade();
The following example shows you how to use the new method HttpServerResponse.toWebSocket().
request.response().toWebSocket(ar -> {
if (ar.succeeded()) {
ServerWebSocket ws = ar.result();
}
});
request.response().toWebSocket(ar -> {
if (ar.succeeded()) {
ServerWebSocket ws = ar.result();
}
});
3.2.4. Deprecated the sockjs.BridgeOptions class 复制链接链接已复制到粘贴板!
The sockjs.BridgeOptions class has been deprecated. Use the new sockjs.SockJSBridgeOptions class instead. The sockjs.SockJSBridgeOptions class contains all the options that are required to configure the event bus bridge.
There is no change in the behavior of the new class, except that the name of the data object class has changed. When new bridges were added, there were a lot of duplicate configurations. The new class contains all the possible common configurations, and removes duplicate configurations.
The verticle methods start(Future<Void>) and stop(Future<Void>) have been deprecated. Use the methods start(Promise<Void>) and stop(Promise<Void>) to work with promise.
The extension mechanism for DNS is disabled by default in Eclipse Vert.x. To enable EDNS use the method AddressResolverOptions.setOptResourceEnabled(). Specify the input parameter optResourceEnabled as true.
3.2.7. New connection handler methods 复制链接链接已复制到粘贴板!
The following new handler methods are available:
The
HttpClientRequest.connectionHandler()method is deprecated and will be removed in a future release. UseHttpClient.connectionHandler()method instead to call connection handlers for client requests in your application. For example, use the following code to work withHttpClient.connectionHandler()method:client.connectionHandler(conn -> { // Connection related code });client.connectionHandler(conn -> { // Connection related code });Copy to Clipboard Copied! Toggle word wrap Toggle overflow Future<T>.setHandler()method is deprecated and will be removed in a future release. UseFuture<T>.onComplete(),Future<T>.onSuccess(), andFuture<T>.onFailure()methods instead to call handlers on completion, success, and failure results of an action. For example, use the following code to work withFuture<T>.onComplete()method:Future<String> fut = getSomeFuture(); fut.onComplete(ar -> ...);
Future<String> fut = getSomeFuture(); fut.onComplete(ar -> ...);Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2.8. AdminUtils Class is no longer available 复制链接链接已复制到粘贴板!
The AdminUtils class is no longer available. Use the new KafkaAdminClient class instead to perform administrative operations on a Kafka cluster.
3.2.9. Updates in HTTP Methods for WebSocket 复制链接链接已复制到粘贴板!
The updates in the HTTP methods for WebSocket are:
The usage of the term WebSocket in method names was inconsistent. The method names had incorrect capitalization, for example, Websocket, instead of WebSocket. The methods that had inconsistent usage of web socket in the following classes have been deprecated and will be removed in a future release. Use the new methods that have correct capitalization instead.
The following methods in
HttpServerOptionsclass are deprecated.Expand Deprecated Methods New Methods getMaxWebsocketFrameSize()getMaxWebSocketFrameSize()setMaxWebsocketFrameSize()setMaxWebSocketFrameSize()getMaxWebsocketMessageSize()getMaxWebSocketMessageSize()setMaxWebsocketMessageSize()setMaxWebSocketMessageSize()getPerFrameWebsocketCompressionSupported()getPerFrameWebSocketCompressionSupported()setPerFrameWebsocketCompressionSupported()setPerFrameWebSocketCompressionSupported()getPerMessageWebsocketCompressionSupported()getPerMessageWebSocketCompressionSupported()setPerMessageWebsocketCompressionSupported()setPerMessageWebSocketCompressionSupported()getWebsocketAllowServerNoContext()getWebSocketAllowServerNoContext()setWebsocketAllowServerNoContext()setWebSocketAllowServerNoContext()getWebsocketCompressionLevel()getWebSocketCompressionLevel()setWebsocketCompressionLevel()setWebSocketCompressionLevel()getWebsocketPreferredClientNoContext()getWebSocketPreferredClientNoContext()setWebsocketPreferredClientNoContext()setWebSocketPreferredClientNoContext()getWebsocketSubProtocols()getWebSocketSubProtocols()setWebsocketSubProtocols()setWebSocketSubProtocols()The new methods for WebSocket subprotocols use
List<String>data type instead of a comma separated string to store items.The following methods in
HttpClientOptionsclass are deprecated.Expand Deprecated Methods New Methods getTryUsePerMessageWebsocketCompression()getTryUsePerMessageWebSocketCompression()setTryUsePerMessageWebsocketCompression()setTryUsePerMessageWebSocketCompression()getTryWebsocketDeflateFrameCompression()getTryWebSocketDeflateFrameCompression()getWebsocketCompressionAllowClientNoContext()getWebSocketCompressionAllowClientNoContext()setWebsocketCompressionAllowClientNoContext()setWebSocketCompressionAllowClientNoContext()getWebsocketCompressionLevel()getWebSocketCompressionLevel()setWebsocketCompressionLevel()setWebSocketCompressionLevel()getWebsocketCompressionRequestServerNoContext()getWebSocketCompressionRequestServerNoContext()setWebsocketCompressionRequestServerNoContext()setWebSocketCompressionRequestServerNoContext()The following handler methods in
HttpServerclass are deprecated.Expand Deprecated Methods New Methods websocketHandler()webSocketHandler()websocketStream()webSocketStream()
-
WebsocketRejectedExceptionis deprecated. The methods will throw theUpgradeRejectedExceptioninstead.
The following authentication and authorization classes and methods are deprecated and will be replaced in a future release.
Classes:
-
AbstractUser -
PubSecKeyOptions -
JDBCAuthOptions -
JDBCHashStrategy -
AccessToken -
KeycloakHelper -
ShiroAuth -
AuthProviderInternal
-
Methods:
-
User.isAuthorized() -
User.clearCache() -
User.setAuthProvider() -
Oauth2Auth.introspectToken() -
Oauth2Auth.getFlowType() -
Oauth2Auth.loadJWK() -
Oauth2Auth.rbacHandler() -
Oauth2ClientOptions.isUseBasicAuthorization() -
Oauth2ClientOptions.setUseBasicAuthorizationHeader() -
Oauth2ClientOptions.getScopeSeparator() -
Oauth2ClientOptions.setScopeSeparator()
-
Chapter 4. Release components 复制链接链接已复制到粘贴板!
4.1. Supported Artifacts introduced in this release 复制链接链接已复制到粘贴板!
No artifacts have been moved form Technology Preview to fully supported in this release:
No new artifacts are provided as Technology Preview in this release.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
4.3. Artifacts removed in this release 复制链接链接已复制到粘贴板!
No artifacts are removed in this release.
4.4. Artifacts deprecated in this release 复制链接链接已复制到粘贴板!
No artifacts are marked as deprecated in this release.
Chapter 5. Fixed issues 复制链接链接已复制到粘贴板!
This Eclipse Vert.x release incorporates all bugfixes from community release of versions 3.9.6. Issues resolved in the community releases are listed in the Eclipse Vert.x 3.9.6 community release notes.
In Eclipse Vert.x 3.9.5, vertx-rx-java and vertx-rx-java2 modules were marked as optional dependencies in the POM files. However, by default, the Eclipse Vert.x JUnit5 extension code loaded the Rx versions of Vertx and WebClient classes. Since these dependencies were not available, exceptions were thrown.
This issue has been fixed in Eclipse Vert.x 3.9.6. The RxJava1 and RxJava2 dependencies have been added by default in the POM file.
In previous releases of Eclipse Vert.x, when building a project that includes the vertx-kafka-client artifact, Maven generated the following warning, potentially causing the build to fail:
The POM for org.scala-lang:scala-compiler:jar:${starr.version} is missing, no dependency information available
The POM for org.scala-lang:scala-compiler:jar:${starr.version} is missing, no dependency information available
This issue is resolved in the Eclipse Vert.x 3.9.6 release and no longer occurs.
In previous releases of Eclipse Vert.x, a messageHandler attached to an AmqpReceiver instance that was set to print a message received from a Sender instance located on the same address to standard output would fail to print the message to the log despite having received it. The issue resulted from using a deprecated createReceiver method to initialize the AmqpReceiver instance. The deprecated method is removed from the vertx-amqp-client module in the Eclipse Vert.x 3.9.6 release and the issue no longer occurs.
Chapter 6. Known issues 复制链接链接已复制到粘贴板!
The Red Hat AMQ Streams Operator and Kafka images are not available for IBM Z and IBM Power Systems. Since the images are not available, the vertx-kafka-client module is not certified to work with AMQ Streams on IBM Z and IBM Power Systems.
Description
Attempting to open a TLS-secured connection using OpenSSL between an application container built on a RHEL 8-based OpenJDK builder image and a database container built on a RHEL 7-based MySQL 5.7 container image results in a connection failure due to a javax.net.ssl.SSLHandshakeException at runtime: For more detail, view the issue in JIRA.
... Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) ...
...
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
...
Cause
The issue occurs due to a difference in the latest supported TLS protocol version between RHEL 7 and RHEL 8. The TLS implementation on RHEL 7 supports TLS protocol versions 1.0 (deprecated), 1.1, and 1.2. The TLS implementation on RHEL 8 also supports TLS protocol version 1.3, which is also the default TLS version used in RHEL 8-based builder images. This discrepancy may cause a TLS protocol version mismatch between application components while negotiating a TLS handshake, which in turn causes the connection between the application and database containers to fail.
Workaround
To prevent the issue described above, manually specify a TLS protocol version that is supported on both operating system versions in your database connection string. For example:
jdbc:mysql://testdb-mysql:3306/testdb?enabledTLSProtocols=TLSv1.2
jdbc:mysql://testdb-mysql:3306/testdb?enabledTLSProtocols=TLSv1.2
Making an HTTP request on an endpoint of an Eclipse Vert.x application using either the curl tool or a Java HTTP client, produces the following error in the logs after each request:
io.vertx.core.net.impl.ConnectionBase SEVERE: java.io.IOException: Connection reset by peer
io.vertx.core.net.impl.ConnectionBase
SEVERE: java.io.IOException: Connection reset by peer
This behavior is caused by the interaction of the Netty application framework and the HAProxy load-balancer used by OpenShift. The error occurs due to existing HTTP connections being re-used by HAProxy without closing. Even though the error message is logged, no error condition occurs. HTTP requests are handled correctly and the application responds as expected.