So, I have a JPA aggregate where all the message handlers are scattered on different Spring beans, as well as the event publishing happens through the event gateway.
So, I put @Profile annotations on these spring beans and split up the service into multiple and it all works, except that my event listener, which is supposed to log any event, doesn’t seem to receive any events.
I am using Axon Server SE for that.
Tried making event processors subscribing – no difference.
@EventHandler javadoc says to not ignore events (why do we event have to do something to not ignore events???) place the handle in an abstract class, so I put it in an aggregate superclass but – no difference.
The application is basically Allard’s bike rental demo. I have registration, rental, and return services, which all share the same H2 database.
Please, don’t mind the weirdness, this demo is gradual and in the end I will put all into the aggregate, but even then we got problems with events being ignored.
Find the sources at this branch https://github.com/Sam-Kruglov/bike-rental-demo/tree/help