1

Our axon backed service runs on several nodes. Our event processors are tracking (1 segment, thus active on one node). If I subscribe to a query on node A and the event that should trigger the update is handled on node B, node A will miss this.

Is this by design or should this work and am I misconfiguring the application?

In case of the former, what could we do to implement a likewise functionality in the most axon idiomatic manner? (currently we poll the data source / projection directly for x seconds)

1 Answer 1

1

The QueryBus you are using is a SimpleQueryBus which stays within a single JVM, always.

If you need a distributed version of the QueryBus, you should turn towards using Axon Server as the centralized means to route queries between your nodes.

Note that although you could create this yourself, people have tried to do so (as shown in this Pull Request on the framework) and decided against it in favor of the optimizations made in Axon Server.

So, in short, I am assuming you are currently excluding the Axon Server connector. Thus the framework gives you the SimpleQueryBus, which is indeed designed to not span several nodes. And lastly, the quickest way to achieve distributed routing of queries is to use Axon Server.

2
  • Thanks, we’ll definitely check if axon server can help us here.
    – Jan
    Commented Sep 21, 2019 at 6:41
  • Happy to have helped! Let me (or AxonIQ) know if I can help out with this.
    – Steven
    Commented Sep 23, 2019 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.