smallrye-reactive-messaging icon indicating copy to clipboard operation
smallrye-reactive-messaging copied to clipboard

[Enhancement] Tries to inject Vertx instance from CDI using a qualifier

Open gaol opened this issue 1 year ago • 2 comments

Currently the Vertx instance used in the reactive messaging comes from either CDI Instance<Vertx> or a new instance via Vertx.vertx().

In some case, the Vertx instance is exposed with a CDI qualifier, it would be good if we can only inject the instance with the qualifier.

More information can be found at the Zulip discussion: https://wildfly.zulipchat.com/#narrow/stream/174184-wildfly-developers/topic/vertx.20subsystem.20integration

gaol avatar Sep 27 '24 14:09 gaol

@kabir would you please check ? thanks :)

gaol avatar Sep 27 '24 14:09 gaol

@ozangunalp Just so you know, we are doing this due to https://github.com/smallrye/smallrye-reactive-messaging/discussions/2725.

At the moment in WildFly, we end up calling Vertx.vertx() for every single deployment, and also we do the same in Otel. So we are looking at adding a vertx subsystem in order to:

  • have a shared instance
  • configure things in that shared instance, as in that linked discussion

Now, although this will probably come in to WildFly soon, it will be at a lower 'stability level' so it isn't available yet in the default installation when you start WildFly normally (we're doing this to allow community to evolve faster than what we fork to become the product). The qualifier will help us opt in and out of this shared instance per subsystem.

kabir avatar Sep 27 '24 14:09 kabir