From b76452856b70b8550fc6793c91f900332e6eed9e Mon Sep 17 00:00:00 2001 From: Lin Gao Date: Mon, 16 Dec 2024 19:36:54 +0800 Subject: [PATCH 1/2] Add a post about the vertx subsystem in WildFly Preview --- ...2024-12-16-vertx-subsystem-in-preview.adoc | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 _posts/2024-12-16-vertx-subsystem-in-preview.adoc diff --git a/_posts/2024-12-16-vertx-subsystem-in-preview.adoc b/_posts/2024-12-16-vertx-subsystem-in-preview.adoc new file mode 100644 index 00000000..28fce4cd --- /dev/null +++ b/_posts/2024-12-16-vertx-subsystem-in-preview.adoc @@ -0,0 +1,81 @@ +--- +layout: post +title: "Introducing Vertx Subsystem in WildFly Preview" +date: 2024-12-16 +tags: wildfly, vertx, microprofile +author: gaol +description: Learn about Vertx configuration in WildFly Preview 35 +--- + += Introducing Vertx Subsystem in WildFly Preview + +I'm excited to announce the integration of the link:https://github.com/wildfly-extras/wildfly-vertx-feature-pack[WildFly Vertx Feature Pack, window=_blank] into WildFly Preview from WildFly 35 Beta release. This feature pack introduces Vertx configuration capabilities through the WildFly management model, making it easier to manage and integrate Vertx with existing WildFly subsystems. + +NOTE: In the 35 release, the vertx subsystem is only available in WildFly Preview, and not in standard WildFly. It is provided at the link:https://docs.wildfly.org/34/Admin_Guide.html#Feature_stability_levels[`preview` stability level, window=_blank], which is enabled out-of-the-box in WildFly Preview. + +== Eclipse Vert.x Overview + +link:https://github.com/eclipse-vertx/vert.x/[Eclipse Vert.x, window=_blank] is an open-source toolkit designed for building event-driven, asynchronous applications. + +Currently, Vertx instances have been used by `opentelemetry` and `microprofile-reactive-messaging-smallrye` subsystems within WildFly to provide features powered by vertx components underneath, but there was no central mechanism to configure them. + +== Key Features of the WildFly Vertx Feature Pack +This feature pack provides centralized configuration and management of the Vertx instance, so administrators now have a unified way to define and manage the Vertx instance. + +Following the recommendation from the Vert.x team, it is good to have a single Vertx instance for everything, which ensures optimal efficiency and simplicity. + +1. **Configurable VertxOptions**: Administrators can define Vertx configurations using the WildFly management model, ensuring consistency across subsystems. +2. **Expose the Vertx Instance to CDI container**: When administrators set up a Vertx instance in the vertx subsystem, it is exposed to the CDI container with a fixed qualifier, so other subsystems like opentelemetry and microprofile-reactive-messaging-smallrye can use it using CDI API. + +== Configuring Vertx instance in WildFly Preview + +Vertx instance in WildFly Preview is configured using the new `vertx` subsystem. This subsystem isn't included in any of WildFly Preview's out-of-the-box configuration files, so to use it you'll need to add it to your configuration. + +If you're using a complete WildFly Preview installation, like the ones available from the https://wildfly.org/downloads[WildFly downloads page, window=_blank], then you can use the JBoss CLI to add the vertx extension and subsystem to your configuration: + +[source] +---- +$ /extension=org.wildfly.extension.vertx:add +$ /subsystem=vertx:add +---- + +Once `vertx` subsystem is added, you can define some VertxOptions and set up the Vertx instance to refer to the options you just configured: + +[source] +---- +$ /subsystem=vertx/vertx-option=vo:add(event-loop-pool-size=20, max-eventloop-execute-time=5, max-eventloop-execute-time-unit=SECONDS) +$ /subsystem=vertx/vertx=vertx:add(option-name=vo) +---- + +You will see the configuration like: + +[source, xml] +.standalone.xml +---- + + + + + + +---- + +For more configuration, please refer to the link:https://github.com/wildfly-extras/wildfly-vertx-feature-pack/wiki/Configuration-Guide[Configuration-Guide] in the wildfly-vertx-feature-pack Wiki page. + +== Use Cases +With above configuration, there is a Vertx instance exposed in CDI container with a qualifier, which has been integrated to opentelemetry subsystem (microprofile-reactive-messaging-smallrye subsystem soon) by setting the associated configuration item internally. + +So when you play link:https://github.com/wildfly/quickstart/tree/35.0.0.Beta1/opentelemetry-tracing[opentelemetry-tracing] quickstart with the vertx configuration above, you will see a log message: + +[source] +---- +[org.wildfly.extension.vertx] (default task-1) WFLYVTX0008: Use Vertx instance from vertx subsystem +---- +which indicates that the Vertx instance from the vertx subsystem is used underneath. The Vertx instance has `20` event loop threads set, and it will log a warning if it detects that event loop threads haven't returned within `5 seconds`. + +== Future plan +* There is a plan to increase the stability level to `community` and finally to the `default` level to be used in the standalone WildFly distributions. +* Now the vertx subsystem is integrated internally whenever it is available, maybe it is better to give the decisions to the administrators so that they can configure the opentelemetry subsystem and microprofile-reactive-messaging-smallrye subsystem to use or not the vertx instance coming from the vertx subsystem. +* When this vertx subsystem becomes mature enough and higher stability level, we also consider to move it to WildFly codebase to align the release cycles. + +Please try out the vertx subsystem in WildFly Preview and give us your feedback! We’ll continue to work on the integration, with a goal of including it in standard WildFly in one of the next couple of releases. \ No newline at end of file From 49a30493a9577be757f45a9f91565ddc27b27fcd Mon Sep 17 00:00:00 2001 From: "Wildfly.org CI" Date: Tue, 17 Dec 2024 22:05:26 +0000 Subject: [PATCH 2/2] Update 2024-12-16-vertx-subsystem-in-preview.adoc blog date --- ...-preview.adoc => 2024-12-17-vertx-subsystem-in-preview.adoc} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename _posts/{2024-12-16-vertx-subsystem-in-preview.adoc => 2024-12-17-vertx-subsystem-in-preview.adoc} (99%) diff --git a/_posts/2024-12-16-vertx-subsystem-in-preview.adoc b/_posts/2024-12-17-vertx-subsystem-in-preview.adoc similarity index 99% rename from _posts/2024-12-16-vertx-subsystem-in-preview.adoc rename to _posts/2024-12-17-vertx-subsystem-in-preview.adoc index 28fce4cd..870023be 100644 --- a/_posts/2024-12-16-vertx-subsystem-in-preview.adoc +++ b/_posts/2024-12-17-vertx-subsystem-in-preview.adoc @@ -1,7 +1,7 @@ --- layout: post title: "Introducing Vertx Subsystem in WildFly Preview" -date: 2024-12-16 +date: 2024-12-17 tags: wildfly, vertx, microprofile author: gaol description: Learn about Vertx configuration in WildFly Preview 35