Eclipse Vert. x 4.5.8 release, Java microservice development framework

Source: OSCHINA
2024-05-27 13:49:06

Eclipse Vert. x is a microservice development framework based on events and asynchronism, relying on the fully asynchronous Java server Netty, and extending many other features. It is favored by developers for its lightweight, high-performance, and support for multilingual development.

Eclipse Vert. x version 4.5.8 is now available release Some key updates are as follows:

Future expectation + HTTP response expectations

The new function of HTTP/Web client can be used to promote HTTP interaction. This new function will replace the Web client response predicate API with the new expectation based API, providing the same function for HTTP and Web clients.

 client .get( eight thousand and eighty , "myserver.mycompany.com" , "/some-uri" ) .send() .expecting(HttpResponseExpectation.SC_OK.and(HttpResponseExpectation.JSON)) .onSuccess(res -> { // .... });

This feature is actually based on a new Future#expecting Operator, which can synchronously check predicate parts of speech Expectation Operator response

 Future.succeededFuture( "hello" ) .expecting(res -> true ) .onSuccess(s -> System.out.printl( "Expectation met" )); Future.succeededFuture( "hello" ) .expecting(res -> false ) .onFailure(s -> System.out.printl( "Expectation not met" ));

It has many uses, such as HttpResponseExpectation Reusable ex ­ pec ­ ta ­ tions are provided for HTTP and Web clients. It can also facilitate testing, such as:

 public  static <T> Expectation<T> that (Consumer<? super T> consumer) { return value -> { consumer.accept(value); return  true ; }; } @Test
 public  void  someTest () { Future<Result> fut = getSomeFuture() .expecting(that(res -> assertNotNull(res))); }

Default Hazelcast version

Hazelcast dependency changed to 5.3 because Hazelcast 4 is no longer supported and 4.2.8 has a known vulnerability (CVE-2023-45860 CVE-2023-45859、CVE-2023-33265、CVE-2023-33264)。

The cluster manager still uses Hazelcast 4.2.8 and 5.3 for testing, so 4.2.8 is still supported. If necessary, Hazelcast version must be explicitly set to 4.2.8 until the upgrade is achieved.

See more details 4.5.8  Release Notes as well as Abandonment and disruptive changes

Expand to read the full text
Click to join the discussion 🔥 (5) Post and join the discussion 🔥
five comment
zero Collection
 Back to top
Top