-
Notifications
You must be signed in to change notification settings - Fork 11
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
Getting Sagas to work #192
Comments
Hi Michel, you're welcome. I'm glad that it was helpful for you. Draft would take some timeI tried if I can come up with at least a draft for Sagas. But even this seems to take more time. Nevertheless, if you have some code (e.g. in a fork) then I could try to help you with the problems you encountered. CdiResourceInjectorRegarding the two points you mentioned I'm not sure if I got them right. I'll try to answer them anyway 😀. My custom implementation of the CdiResourceInjector does not depend on Quarkus. It depends on the Jakarta EE Standard "jakarta-enterprise-cdi-api". What you probably mean is that my CdiResourceInjector implementation needs "full" CDI (Quarkus nearly "full" is ok) and isn't compatible to CDI-lite SagaLifecycleWith my already mentioned extreme approach of putting Axonframework behind a boundary I had a similar issue as far as I remember with the I hope I could help you somehow. Otherwise just send me an example and maybe I have an idea. I'm currently not able (time-wise) to add Sagas here. But if you got something to work I'm of course curious about that. |
Finally getting back to this after not touching it since then. What I originally wanted to tell is that https://github.com/JohT/showcase-quarkus-eventsourcing/blob/master/showcase-quarkus-eventsourcing/src/main/java/io/github/joht/showcase/quarkuseventsourcing/messaging/infrastructure/axon/inject/cdi/CdiResourceInjector.java#L44 will throw exceptions when using sagas since Quarkus' arc container/bean manager does not implement these methods, see https://github.com/quarkusio/quarkus/blob/3be8518454c54b745e1e5fb44db65044d858082b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/BeanManagerImpl.java#L241 Turns out this is not that big of a deal however since the parameter resolver can be used to inject dependencies on each saga handler rather than having them as injected fields. It is important to note that https://github.com/JohT/showcase-quarkus-eventsourcing/blob/master/showcase-quarkus-eventsourcing/src/main/java/io/github/joht/showcase/quarkuseventsourcing/messaging/infrastructure/axon/inject/cdi/AxonComponentDiscovery.java#L67 should filter out Given that, sagas can be used if working around these limitations is feasible. |
Hi Johannes
First, let me thank you for the work you put into this project.
Getting started (with Quarkus + Axon) was quite easy with the help of it!
Currently I am trying to get Sagas to work but fail to do so on various edges.
CdiResourceInjector
uses the QuarkusBeanManager
which does not implement the required methods (createAnnotatedType
,getInjectionTargetFactory
, etc.)SagaLifecycle#associateWith()
throws anIllegalStateException
inScope#getCurrentScope
since none is activeDid you by any chance look into getting Sagas to work before?
The text was updated successfully, but these errors were encountered: