You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
no message codec is regisered for this class.
Resulting in
java.lang.IllegalArgumentException: No message codec for type: class org.acme.Hello
at io.vertx.core.eventbus.impl.CodecManager.lookupCodec(CodecManager.java:119)
at io.vertx.core.eventbus.impl.EventBusImpl.createMessage(EventBusImpl.java:254)
at io.vertx.core.eventbus.impl.EventBusImpl.publish(EventBusImpl.java:164)
at io.vertx.core.eventbus.impl.EventBusImpl.publish(EventBusImpl.java:159)
at org.acme.GreetingResource.hello(GreetingResource.java:23)
at org.acme.GreetingResource$quarkusrestinvoker$hello_e747664148511e1e5212d3e0f4b40d45c56ab8a1.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
Adding another method without headers will register a codec.
Expected behavior
Message codecs are created on startup regardless of whether the event consumers include headers.
Actual behavior
No message codecs are created, resulting in
java.lang.IllegalArgumentException: No message codec for type: class org.acme.Hello
at io.vertx.core.eventbus.impl.CodecManager.lookupCodec(CodecManager.java:119)
at io.vertx.core.eventbus.impl.EventBusImpl.createMessage(EventBusImpl.java:254)
at io.vertx.core.eventbus.impl.EventBusImpl.publish(EventBusImpl.java:164)
at io.vertx.core.eventbus.impl.EventBusImpl.publish(EventBusImpl.java:159)
at org.acme.GreetingResource.hello(GreetingResource.java:23)
at org.acme.GreetingResource$quarkusrestinvoker$hello_e747664148511e1e5212d3e0f4b40d45c56ab8a1.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
Describe the bug
When a event class is only consumed by
@ConsumeEvent
methods with signatureno message codec is regisered for this class.
Resulting in
Adding another method without headers will register a codec.
Expected behavior
Message codecs are created on startup regardless of whether the event consumers include headers.
Actual behavior
No message codecs are created, resulting in
How to Reproduce?
https://github.com/computerlove/quarkus-evenbus-headers-reproducer
Start with
mvn quarkus:dev
and GET http://localhost:8080/helloException will be printed in terminal.
Commenting in the extra listener,
listenNoHeaders
, inListener.java
will result in the expected behaviour.Output of
uname -a
orver
No response
Output of
java -version
java 17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.15.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: