Having Issue with my POC using Axon Framework

Hi,

I am working on a Microservices POC using Axon Framework.

I am using axon-spring-boot-starter.

In my Aggregate class, I am able to fire an event (ClientCreatedEvent) which is consumed by a method annotated with @EventSourcingHandler.

I have another class in which I am using same event as parameter to a handler method annotated with @EventHandler.

I am using this handler to update my query db. This method is not getting fired.

Could you please help me here?

Thanks and Regards,
Anshul Agarwal

Hi,

did you annotate your @EventHandler bean with @Component (by Spring)?
Also make your EventHandler bean is discovered by Spring’s component scanning (by placing it in a sub m-package of your Application class)

Cheers,

Allard