remote Axon server and retrieving current state

Hi,

I am writing a sample code to demonstrate the Microservice CQRS and Event sourcing with Axon 4.

Now I have a couple of questions.

  1. If I have 2 domain contexts and they are running on the separate servers. I think Axon server works like command and event hub.
    If Axon server is also running on the physically separated server, how my application can communicate to Axson server?

  2. How I can retrieve the current state data(write data) from Axon server and re-apply them to read data side?
    For example, DBA just dropped a Order table from the read side, then we need to restore the data from the write side. How can this be achieved?

Thank you,
Brian

Hi Brian,

Applications can communicate with a remote AxonServer by setting the property:

axon.axonserver.servers=<AxonServerHost>:8124

By setting this property for both applications they will connect to the same AxonServer, and with that share the same Event Store.

If you want to restore your read models, you can use the tracking event processor replay options, as explained in:

https://docs.axoniq.io/reference-guide/configuring-infrastructure-components/event-processing/event-processors


Regards,
Marc