Skip to content

Migration Guide 2.13

Bruno Baptista edited this page Sep 30, 2022 · 17 revisions

SmallRye Reactive Messaging

Prior to Quarkus 2.13, the Reactive Messaging consuming methods were called with an active CDI request context, inadvertently propagated, and were never terminated. Quarkus corrects this behaviour and makes sure the request context is not activated unnecessarily on message consuming methods. Code relying on the presence of the RequestScoped beans might need to start a request scope explicitly; for example, using @ActivateRequestContext annotation on the message consuming method.

Note that using @ActivateRequestContext on a method creates a request context if the method is not already called on an existing request context. If a new context was created for the method, at the end of the method execution (e.g. the completion of the returned Uni or CompletionStage) the context will be destroyed, effectively disposing request scoped beans bound to it.

@TestHTTPResource URI

When using @TestHTTPResource as described here, the injected URI now also contains the any path that was specified in the quarkus.http.root-path configuration property.

@InjectMock

The quarkus-junit5-mockito extension is internally using the javax.enterprise.inject.spi.BeanManager#getBeans() method to get the set of beans eligible for an @InjectMock injection point. Unfortunately, the behavior of BeanManager#getBeans() was broken - if no qualifier was specified then any bean that matching the required type was eligible for injection. However, the CDI specification mandates that the container must assume the @Default qualifier instead. As a result, a test that injects a mock of a bean with non-@Default qualifier and does not specify the qualifier explicitly will fail. A typical example is injection of a Reactive REST Client - an @InjectMock injection point needs to be annotated with @org.eclipse.microprofile.rest.client.inject.RestClient.

OpenTelemetryClientFilter

The OpenTelemetryClientFilter is not required to be registered manually anymore. Before, when creating a programatic javax.ws.rs.client.Client with javax.ws.rs.client.ClientBuilder.newClient(), this filter was required to enable OpenTelemetry Tracing to create Spans for that client. The Vert.x client now adds the OpenTelemetry instrumentation, simplifying this client's creation.

Current Version

Migration Guide 3.16

Next Version

Migration Guide 3.17

Clone this wiki locally