question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MutinyEmitter fails with an outbound connector configured

See original GitHub issue

Describe the bug MutinyEmitter fails with java.lang.IllegalStateException: SRMSG00027: No subscriber found for the channel price-create when the channel (“price-create”) is connected to an outbound connector instead of an in-memory method annotated with @Incoming. Changing MutinyEmitter to Emitter produces the expected behavior of queuing the message.

Expected behavior Message should be sent via configured outbound connector by the application.properties

Actual behavior java.lang.IllegalStateException is thrown and no message is sent

To Reproduce Clone repo https://github.com/tcerdaITBA/quarkus-mutiny-emitter-bug

Steps to reproduce the behavior:

  1. ./mvnw compile quarkus:dev
  2. curl localhost:8080/hello-resteasy

Configuration

amqp-username=quarkus
amqp-password=quarkus

mp.messaging.outgoing.price-create.connector=smallrye-amqp
mp.messaging.outgoing.price-create.address=prices

mp.messaging.incoming.prices.connector=smallrye-amqp
mp.messaging.incoming.prices.durable=true

Aditional context

Complete stacktrace:

SRMSG00234: Failed to emit a Message to the channel: java.lang.IllegalStateException: SRMSG00027: No subscriber found for the channel price-create
	at io.smallrye.reactive.messaging.extension.AbstractEmitter.verify(AbstractEmitter.java:162)
	at io.smallrye.reactive.messaging.extension.AbstractEmitter.emit(AbstractEmitter.java:144)
	at io.smallrye.reactive.messaging.extension.MutinyEmitterImpl.lambda$send$2(MutinyEmitterImpl.java:26)
	at io.smallrye.mutiny.operators.UniCreateWithEmitter.subscribing(UniCreateWithEmitter.java:22)
	at io.smallrye.mutiny.operators.UniSerializedSubscriber.subscribe(UniSerializedSubscriber.java:54)
	at io.smallrye.mutiny.operators.UniSerializedSubscriber.subscribe(UniSerializedSubscriber.java:49)
	at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:30)
	at io.smallrye.mutiny.context.ContextPropagationUniInterceptor$2.lambda$subscribing$0(ContextPropagationUniInterceptor.java:48)
	at io.smallrye.context.SmallRyeThreadContext.lambda$withContext$1(SmallRyeThreadContext.java:530)
	at io.smallrye.mutiny.context.ContextPropagationUniInterceptor$2.subscribing(ContextPropagationUniInterceptor.java:48)
	at io.smallrye.mutiny.operators.UniSerializedSubscriber.subscribe(UniSerializedSubscriber.java:54)
	at io.smallrye.mutiny.operators.UniSerializedSubscriber.subscribe(UniSerializedSubscriber.java:49)
	at io.smallrye.mutiny.groups.UniSubscribe.withSubscriber(UniSubscribe.java:50)
	at io.smallrye.mutiny.groups.UniSubscribe.with(UniSubscribe.java:70)
	at io.smallrye.reactive.messaging.extension.MutinyEmitterImpl.sendAndForget(MutinyEmitterImpl.java:43)
	at org.acme.amqp.PriceEmitter.emitPrice(PriceEmitter.java:22)
	at org.acme.amqp.PriceEmitter_ClientProxy.emitPrice(PriceEmitter_ClientProxy.zig:157)
	at org.acme.PriceResource.hello(PriceResource.java:18)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:130)
	at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:643)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:507)
	at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:457)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:459)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:419)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:393)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:68)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
	at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
	at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:136)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.access$000(VertxRequestHandler.java:40)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:97)
	at io.quarkus.runtime.CleanableExecutor$CleaningRunnable.run(CleanableExecutor.java:231)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
	at java.base/java.lang.Thread.run(Thread.java:832)
	at org.jboss.threads.JBossThread.run(JBossThread.java:479)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
cescoffiercommented, Jan 4, 2021

(marking it as won’t fix as it won’t be fixed in quarkus per se 😃)

1reaction
cescoffiercommented, Jan 5, 2021

I’ve good and bad news.

The bad news: yes, that’s a bug, I was able to reproduce it with the reproducer. The good news: it’s already fixed in master.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Emitters and Channels - SmallRye Reactive Messaging
In other words, send messages to channels handled by reactive messaging and how can you ... or an outbound connector configured to manage...
Read more >
Apache Kafka Reference Guide - Quarkus
Connectors are configured to map incoming messages to a specific channel (consumed by ... MutinyEmitter#send(Message msg) method is deprecated in favor of ...
Read more >
SmallRye Reactive Messaging's Emitter<>.send doesn't send ...
Currently, I am trying to write a 'notification service' based on Maven, Quarkus and SmallRye Reactive Messaging in Kotlin. As a base I...
Read more >
CWMRX - IBM
Explanation, An error occurred when the Kafka connector was set up for an incoming reactive messaging channel. This might be caused by a...
Read more >
Kafka Fail-Over Using Quarkus Reactive Messaging - DZone
We will not talk about how to set up both Kafka clusters. You can feel free to use any ... Also, we have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found