MicroProfile Reactive Messaging in WildFly 23, and WildFly MicroProfile Reactive Specifications Feature Pack 2.0.0.Final
I am pleased to announce the 2.0.0.Final release of the MicroProfile Reactive Specifications Feature Pack for WildFly. Between the 1.0.0.Final release and the WildFly 23.0.0.Final release, we pulled the core of what the feature pack contained into WildFLy.
WildFly now contains these Galleon layers which used to live in the 1.0.x stream of the feature pack:
microprofile-reactive-messaging- Provides the MicroProfile Reactive Messaging 1.0 functionality - this is a framework for building event-driven, data streaming and event sourcing applications using CDI. The streams, or channels, can be backed by a variety of messaging technologies.
microprofile-reactive-messaging-kafka- The include the connector for Kafka in WildFly, in the layer
microprofile-reactive-streams-operators- provides the MicroProfile Reactive Streams Operators 1.0 functionality.
The WildFly 23.0.0.Final zip available from our downloads page contains these layers, however they are not enabled by default. To enable the functionality you need to add the extensions and enable the subsystems. The simplest way is to run this CLI script. This script is taken from the WildFly Reactive Messaging with Kafka QuickStart, which you can find here to get you started.
The Feature Pack
As before to use the feature pack you will need to use Galleon to provision a server, as pointed out in the feature pack README. That README contains more details of what is contained, but in summary it contains Galleon layers to provide the following functionality:
MicroProfile Context Propagation 1.0 functionality.
Additional Reactive Messaging connectors for:
We decided to remove RxJava2 support of context propagation for the feature pack since that caused some problems under the hood. RxJava2 is not a supported API for user applications in WildFly (although we use it for somem internal functionality). If you have the need to process streams, please use the MicroProfile Reactive Streams Operators API instead.
Note that the 2.0.x series of the feature pack will only work with WildFLy 23.
For earlier WildFly versions, use the 1.0.x releases. The present latest release on that stream, 1.0.2, works with WildFLy 21 and WildFly 22.
It is worth pointing out that we’re strictly staying with what version 1.0 of the MicroProfile Reactive Messaging specification provides. However, the SmallRye Reactive Messaging version we use is used to develop the next version of the specification, which is not ready yet. If you wish to get a preview of that, the steps are to instead of compiling your application against
org.eclipse.microprofile.reactive.messaging:microprofile-reactive-messaging-api:1.0, compile against
io.smallrye.reactive:smallrye-reactive-messaging-api:3.0.0, and make sure you start the server with
-Djboss.as.reactive.messaging.experimental=true which will bypasss some checks and allow you to use more recent, although currently unreleased constructs such as @Channel and Emitter. Note: - these APIs may still change until there is a final release of the next specification version.
What is coming up?
Once the MicroProfile Reactive Messaging 2.0 specification is released and the other reactive specifications, MicroProfile Reactive Streams Operators and MicroProfile Context Propagation, are finalised, we will start work on integrating them into a future (as yet to be determined) WildFly version. With the current information, the feature pack then mainly becomes a place for the connectors we don’t want in WildFly yet.
We’re keen to hear your feedback! Please raise any issues found with the feature pack at https://github.com/wildfly-extras/wildfly-mp-reactive-feature-pack/issues. And for the parts in WildFly, raise issues at https://issues.redhat.com, in the WFLY project (using 'MP Reactive Messaging' as the component).