Skip to content

Commit

Permalink
Merge pull request #17438 from cescoffier/update-smallrye-reactive-me…
Browse files Browse the repository at this point in the history
…ssaging-3.3.2

Update to SmallRye Reactive Messaging 3.3.2
  • Loading branch information
gsmet authored May 25, 2021
2 parents 0ec1a21 + cebed4d commit ed738e1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<smallrye-context-propagation.version>1.2.0</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-utils.version>2.5.1</smallrye-reactive-utils.version>
<smallrye-reactive-messaging.version>3.3.0</smallrye-reactive-messaging.version>
<smallrye-reactive-messaging.version>3.3.2</smallrye-reactive-messaging.version>
<smallrye-safer-annotations.version>1.0.3</smallrye-safer-annotations.version>
<jakarta.activation.version>1.2.1</jakarta.activation.version>
<jakarta.annotation-api.version>1.3.5</jakarta.annotation-api.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private QuarkusMediatorConfigurationUtil() {

public static QuarkusMediatorConfiguration create(MethodInfo methodInfo, boolean isSuspendMethod, BeanInfo bean,
RecorderContext recorderContext,
ClassLoader cl) {
ClassLoader cl, boolean strict) {

Class[] parameterTypeClasses;
Class<?> returnTypeClass;
Expand Down Expand Up @@ -69,6 +69,10 @@ public static QuarkusMediatorConfiguration create(MethodInfo methodInfo, boolean
methodInfo.parameters().isEmpty() ? new AlwaysInvalidIndexGenericTypeAssignable()
: new MethodParamGenericTypeAssignable(methodInfo, 0, cl));

if (strict) {
mediatorConfigurationSupport.strict();
}

configuration.setBeanId(bean.getIdentifier());
configuration.setMethodName(methodInfo.name());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public void build(SmallRyeReactiveMessagingRecorder recorder, RecorderContext re

QuarkusMediatorConfiguration mediatorConfiguration = QuarkusMediatorConfigurationUtil
.create(methodInfo, isSuspendMethod, bean, recorderContext,
Thread.currentThread().getContextClassLoader());
Thread.currentThread().getContextClassLoader(), conf.strict);
mediatorConfigurations.add(mediatorConfiguration);

String generatedInvokerName = generateInvoker(bean, methodInfo, isSuspendMethod, mediatorConfiguration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ public class ReactiveMessagingConfiguration {
*/
@ConfigItem(name = "metrics.enabled")
public boolean metricsEnabled;

/**
* Enables or disables the strict validation mode.
*/
@ConfigItem(name = "strict", defaultValue = "false")
public boolean strict;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.context.Initialized;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.DefinitionException;
import javax.enterprise.inject.spi.DeploymentException;
import javax.inject.Inject;
import javax.interceptor.Interceptor;
Expand Down Expand Up @@ -39,7 +40,7 @@ void onApplicationStart(@Observes @Priority(Interceptor.Priority.LIBRARY_BEFORE)
try {
mediatorManager.start();
} catch (Exception e) {
if (e instanceof DeploymentException) {
if (e instanceof DeploymentException || e instanceof DefinitionException) {
throw e;
}
throw new DeploymentException(e);
Expand Down
4 changes: 1 addition & 3 deletions tcks/microprofile-reactive-messaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<!-- Disable quarkus optimization -->
<quarkus.arc.remove-unused-beans>false</quarkus.arc.remove-unused-beans>
<smallrye-messaging-strict-binding>true</smallrye-messaging-strict-binding>
<quarkus.reactive-messaging.strict>true</quarkus.reactive-messaging.strict>
</systemPropertyVariables>
<!-- This workaround allows us to run a single test using
the "test" system property -->
Expand All @@ -33,9 +34,6 @@
<excludes>
<!-- The new wiring fails at the Quarkus startup because of the incorrect configuration -->
<exclude>org.eclipse.microprofile.reactive.messaging.tck.invalid.InvalidConfigurationTest</exclude>
<exclude>org.eclipse.microprofile.reactive.messaging.tck.connector.MissingConnectorTest</exclude>
<exclude>org.eclipse.microprofile.reactive.messaging.tck.channel.EmitterInjectionMissingChannelTest</exclude>
<exclude>org.eclipse.microprofile.reactive.messaging.tck.signatures.invalid.InvalidSubscriberSignatureTest</exclude>

<!-- the test need to be challenged - the error emission may happen after -->
<exclude>org.eclipse.microprofile.reactive.messaging.tck.channel.overflow.DefaultOverflowStrategyOverflowTest</exclude>
Expand Down

0 comments on commit ed738e1

Please sign in to comment.