Good evening
I am a newbie with Axon. I have a question about Event Sourcing with Axon. I am looking for an opinion and hear your experience with event sourcing
1. A command is triggered using a CommandGateway
2. A command handler capture the command and apply an event.
3. An eventsourcing handler passes the values from the event to the aggregator
4. An eventhandler will execute to save the data into the read model
That is my little knowledge in how Axon works. After that everything is cloudy.
My read model is a table in Postgres. That I am saving it when and event handler happens. Notice that I am not combining the eventsourcinghandler annotation with the eventhandler. Is that the correct approach? I have been reading about event sourcing that you need to read all the events from the event source to obtain the current state, however, I have not found how this work with Axon.
Also, I have read that you can basically create a process where load all the events in memory so it can be used for the application during the day, but if that is the case I guess my point 4 should not happen.
Could someone explain a little bit more about how this happen or can be done in Axon? Maybe my question does not make any sense, but if do not could you also please tell me how can I do a read model with Axon.
Richard