I’am working on a setup with 3 nodes (more in the future) running our axon application in a docker container on docker swarm. The commands / external events are passed in from an external system using RabbitMq and are the picked up by one of the nodes. The evenstore is postgres database based on the JpaEventStorageEngine and is of course accessible for all the nodes, the same goes for the JpaSagaStore.
We use blue/green deployments, so at a given time there are some nodes running the new version and some the old version of the software.
What I would like to is that each node has it’s own (embedded H2) query store where the projections are stored. They each use trackingProcessors with the InMemoryTokenStore so after a restart or deployment all events are processed again, because the tokenstore is empty initially. This gives us ultimate flexibility of changing the model of the query store / projections and prevents issues with breaking changes in the model which would affect the other nodes still running the old version of the model it the would share the query store.
So far so good. But during processing of an external events, domain events are generated and they should also be picked up by the other nodes to update their own query model. Otherwise the query models are not in sync with each other.
What is the best way to achieve this or is there a better solution to prevent breaking changes in the query stores?