轴突事件处理程序不在不同的微服务上工作
我正在使用 Axon 框架实现事件驱动的 CQRS 概念。我创建了两个独立的微服务和它们自己的两个写入和读取数据库。
我正在 ms-1 中发布一个事件,现在我想在 ms-2 中处理该事件,以便我可以将其保留在我的读取数据库中。但 @EventHandler 在我的 ms-2 中不起作用。事件发布在 AxonServer 上,我可以在那里看到更新。
是的,我在 ms-2 中的 EventHandler 类上确实有 @Component。另外,我在 docker 上运行 AxonServer。
当 @EventHandler 位于同一个微服务中时,它可以正常工作。
我的 axon-framework 依赖项是 4.5.8,google guava 的依赖项是 30.1.1-jre
I was implementing event-driven CQRS concept using Axon framework. I created two separate microservices and their own two write and read databases.
I am publishing an event in ms-1 and now I want to handle that event in ms-2, so that I can persist it in my read DB. But the @EventHandler is not working in my ms-2. The events are published on the AxonServer, I can see the updates there.
And yes, I do have @Component on the EventHandler class in ms-2. Also, I am running AxonServer on docker.
The @EventHandler works fine when it is in the same microservice.
My axon-framework dependency is 4.5.8 and google guava's is 30.1.1-jre
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论