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 4 months ago • 4 comments

Fixes #2771

This PR tries to add 2 config items:

  • mp.messaging.connector.vertx.cdi.qualifier, which is used to tries to inject the Vertx instance with the specified qualifier if configured.
  • mp.messaging.connector.vertx.cdi.qualifier.required, boolean, which is used to indicate if the qualifier is required in case it comes from CDI, otherwise it will create a new Vertx instance like what current does.

ExecutionHolder is used by both WildFly and Quarkus. And for WildFly, there is a coming vertx subsystem to be able to configure the VertxOptions following the WildFly management model style, which will expose a CDI bean with a qualifier so that other subsystems can select it by themselves. The 2nd config item can be included in the integration code of WildFly so that applications deployed to WildFly will inject only the instance with a qualifier, and leave the use case in Quarkus not changed at all.

gaol avatar Sep 27 '24 14:09 gaol