-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HandlerNotFoundException with Quarkus kediatr-quarkus-starter #380
Comments
Hi,
Your
With this configuration, quarkus is able to detect the beanprovider. I see, you did it already. The next question is, you get build errors right? Mediatr is not present? |
Could also be your JDK version is < 17 |
You don't need that, Quarkus DI should discover them automagically
Indeed there is something wrong with the build system, kediatr-quarkus-starter might not be picked up. To be sure, you're referring kediatr version 3.1.2, right? |
Yes indeed, version 3.1.2. For a test, I copied the kediatr files into my project, and then everything is found - but the handler(s) need to be annotated not only with Anyway ... shame on me: Just realized yesterday that kediatr is async-only. And as some of my code / libs is blocking, and I still have to master how to call blocking code from async code, I just removed the async stuff for now from the in-project kediatr files. So now I have a nice, working, blocking kediatr - but I guess that's not the intended use case ... |
Your Quarkus version is worth checking, since KediatR uses a specific version in that release.
That might be the case, indeed.
You can keep the entrance points (such as controllers, Kafka consumers, etc...) Plus, some Quarkus packages support coroutines: https://quarkus.io/guides/kotlin#coroutines-support
So, I wouldn't advise it:) |
Hi,
I'm trying to use kediatR with Quarkus (version 3.16.3). I'm a Quarkus begginer, so maybe I'm some missing essential stuff ... but following the kediatr docs, I get
com.trendyol.kediatr.HandlerNotFoundException: handler could not be found for <package>.GetUserByIdQuery
on accessing a REST endpoint.<artifactId>kediatr-quarkus-starter</artifactId>
.index-dependency
entry.private val mediator: mediator
into UserResource (type mediator not found compile error), so I usedMediator
.Here is my code:
mediator
a hint that kediatr-quarkus-starter wasn't picked up or initialized? ProbablyMediator
is the wrong type, because kediatR isn't enrichting that with the handlers. But then, how do I make themediator
fromKediatRBeanProvider
known to my code?Thanks for your help!
Tobi
The text was updated successfully, but these errors were encountered: