diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index 8789c4f90b26c..fadad60a12689 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -53,7 +53,7 @@
1.2.0
1.0.13
2.5.1
- 3.3.0
+ 3.3.2
1.0.3
1.2.1
1.3.5
diff --git a/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/QuarkusMediatorConfigurationUtil.java b/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/QuarkusMediatorConfigurationUtil.java
index 3efcc698fb0e2..2782758be2274 100644
--- a/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/QuarkusMediatorConfigurationUtil.java
+++ b/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/QuarkusMediatorConfigurationUtil.java
@@ -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;
@@ -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());
diff --git a/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java b/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java
index 36e1fe4dfc575..5140ccd763cc7 100644
--- a/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java
+++ b/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java
@@ -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,
diff --git a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfiguration.java b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfiguration.java
index d2921610bf9af..b0a385372248f 100644
--- a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfiguration.java
+++ b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfiguration.java
@@ -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;
}
diff --git a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/SmallRyeReactiveMessagingLifecycle.java b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/SmallRyeReactiveMessagingLifecycle.java
index 787b8871f5f39..466c1065e84ff 100644
--- a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/SmallRyeReactiveMessagingLifecycle.java
+++ b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/SmallRyeReactiveMessagingLifecycle.java
@@ -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;
@@ -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);
diff --git a/tcks/microprofile-reactive-messaging/pom.xml b/tcks/microprofile-reactive-messaging/pom.xml
index b83fdcd698c6b..cc80bf66d9fbe 100644
--- a/tcks/microprofile-reactive-messaging/pom.xml
+++ b/tcks/microprofile-reactive-messaging/pom.xml
@@ -23,6 +23,7 @@
false
true
+ true
@@ -33,9 +34,6 @@
org.eclipse.microprofile.reactive.messaging.tck.invalid.InvalidConfigurationTest
- org.eclipse.microprofile.reactive.messaging.tck.connector.MissingConnectorTest
- org.eclipse.microprofile.reactive.messaging.tck.channel.EmitterInjectionMissingChannelTest
- org.eclipse.microprofile.reactive.messaging.tck.signatures.invalid.InvalidSubscriberSignatureTest
org.eclipse.microprofile.reactive.messaging.tck.channel.overflow.DefaultOverflowStrategyOverflowTest