Repository: quarkusio/quarkus
Issue: Application startup  fails using Lombok's @NonNull on a method annotated with @ConsumeEvent

### Describe the bug

When annotating a method parameter with @NonNull for a Vertx Consumer Method (means its annotated with @ConsumeEvent) then the application startup fails, throwing an exception.

Mentioned on: https://github.com/quarkusio/quarkus/discussions/29322

### Expected behavior

No exception is thrown when using @NonNull.

### Actual behavior

Exception is thrown when using @NonNull, application can not be started.

### How to Reproduce?

1. Clone the repo: https://github.com/benjaminrau/quarkus-nonnull-reproducer
2. Start the application

### Output of `uname -a` or `ver`

Linux br-builders-nb 5.14.0-1052-oem #59-Ubuntu SMP Fri Sep 9 09:37:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

### Output of `java -version`

openjdk version "17" 2021-09-14 OpenJDK Runtime Environment (build 17+35-2724) OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

>= 2.14.0.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

Apache Maven 3.6.3

### Additional information

Noticable is that @NonNull is included in the ClassName for EventBusCodec registration too:
`2022-11-23 10:29:52,634 INFO  [io.qua.ver.dep.EventBusCodecProcessor] (build-5) Local Message Codec registered for type org.acme.@NonNull HelloEvent
`

Changed files:
extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusCodecProcessor.java
extensions/vertx/deployment/src/test/java/io/quarkus/vertx/EventBusCodecTest.java

diff --git a/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusCodecProcessor.java b/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusCodecProcessor.java
index 1b6c049760a..3d2aba17ccc 100644
--- a/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusCodecProcessor.java
+++ b/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusCodecProcessor.java
@@ -42,7 +42,7 @@ public void registerCodecs(
 
         final IndexView index = beanArchiveIndexBuildItem.getIndex();
         Collection<AnnotationInstance> consumeEventAnnotationInstances = index.getAnnotations(CONSUME_EVENT);
-        Map<Type, DotName> codecByTypes = new HashMap<>();
+        Map<DotName, DotName> codecByTypes = new HashMap<>();
         for (AnnotationInstance consumeEventAnnotationInstance : consumeEventAnnotationInstances) {
             AnnotationTarget typeTarget = consumeEventAnnotationInstance.target();
             if (typeTarget.kind() != AnnotationTarget.Kind.METHOD) {
@@ -59,7 +59,7 @@ public void registerCodecs(
                 if (codecTargetFromParameter == null) {
                     throw new IllegalStateException("Invalid `codec` argument in @ConsumeEvent - no parameter");
                 }
-                codecByTypes.put(codecTargetFromParameter, codec.asClass().asClassType().name());
+                codecByTypes.put(codecTargetFromParameter.name(), codec.asClass().asClassType().name());
             } else if (codecTargetFromParameter != null) {
                 // Codec is not set, check if we have a built-in codec
                 if (!hasBuiltInCodec(codecTargetFromParameter)) {
@@ -70,24 +70,24 @@ public void registerCodecs(
                                 "The generic message codec can only be used for local delivery,"
                                         + ", implement your own event bus codec for " + codecTargetFromParameter.name()
                                                 .toString());
-                    } else if (!codecByTypes.containsKey(codecTargetFromParameter)) {
+                    } else if (!codecByTypes.containsKey(codecTargetFromParameter.name())) {
                         LOGGER.infof("Local Message Codec registered for type %s",
                                 codecTargetFromParameter.toString());
-                        codecByTypes.put(codecTargetFromParameter, LOCAL_EVENT_BUS_CODEC);
+                        codecByTypes.put(codecTargetFromParameter.name(), LOCAL_EVENT_BUS_CODEC);
                     }
                 }
             }
 
             if (codecTargetFromReturnType != null && !hasBuiltInCodec(codecTargetFromReturnType)
-                    && !codecByTypes.containsKey(codecTargetFromReturnType)) {
+                    && !codecByTypes.containsKey(codecTargetFromReturnType.name())) {
 
                 LOGGER.infof("Local Message Codec registered for type %s", codecTargetFromReturnType.toString());
-                codecByTypes.put(codecTargetFromReturnType, LOCAL_EVENT_BUS_CODEC);
+                codecByTypes.put(codecTargetFromReturnType.name(), LOCAL_EVENT_BUS_CODEC);
             }
         }
 
         // Produce the build items
-        for (Map.Entry<Type, DotName> entry : codecByTypes.entrySet()) {
+        for (Map.Entry<DotName, DotName> entry : codecByTypes.entrySet()) {
             messageCodecs.produce(new MessageCodecBuildItem(entry.getKey().toString(), entry.getValue().toString()));
         }
 
diff --git a/extensions/vertx/deployment/src/test/java/io/quarkus/vertx/EventBusCodecTest.java b/extensions/vertx/deployment/src/test/java/io/quarkus/vertx/EventBusCodecTest.java
index 3bb61dd42ea..26cbd3a1ea8 100644
--- a/extensions/vertx/deployment/src/test/java/io/quarkus/vertx/EventBusCodecTest.java
+++ b/extensions/vertx/deployment/src/test/java/io/quarkus/vertx/EventBusCodecTest.java
@@ -2,6 +2,10 @@
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CompletionStage;
 
@@ -73,6 +77,11 @@ String getMessage() {
         }
     }
 
+    @Retention(RetentionPolicy.CLASS)
+    @Target(ElementType.TYPE_USE)
+    @interface NonNull {
+    }
+
     static class MyBean {
         @ConsumeEvent("person")
         public CompletionStage<Greeting> hello(Person p) {
@@ -83,6 +92,12 @@ public CompletionStage<Greeting> hello(Person p) {
         public CompletionStage<Greeting> hello(Pet p) {
             return CompletableFuture.completedFuture(new Greeting("Hello " + p.getName()));
         }
+
+        // presence of this method is enough to verify that type annotation
+        // on the message type doesn't cause failure
+        @ConsumeEvent("message-type-with-type-annotation")
+        void messageTypeWithTypeAnnotation(@NonNull Person person) {
+        }
     }
 
     static class MyNonLocalBean {