Hi Joseph,
Thanks a lot for your detailed explanations. However, I have further questions for you:
The EventSourcingHandler is on the command side’s Aggregate to dictate how the Aggregate will change, given that event. EventHandlers are normally on query applications/side to dictate what to do once an event has occurred. Strictly speaking, EventHandlers are optional (you are able to have the updated Aggregate (think of it a state machine), by going through the events in the event store, and updating it along the way through the EventSourcingHandlers.
- It seems to me, if I understand correctly, actually you would like to use @eventsourcinghandler as a write/state changing side (in CQRS) or command side events listener that responsible for state changing events, @eventhandlers as the read side (in CQRS) or query side events listener that responsible for query based events? However it leads to my next question:
Once an EventSourcingHandler has finished executing, the event is published to the EventBus, which is then caught by the EventHandlers.
- In practice, if I use both @eventsourcinghandlers and @eventhandlers in one component to accept the same type of events, does it mean, I can receive the same type of events twice?
- When I checked your online reference manual, I found that, currently you only tracking command side events, do you have mechanisms to track query side events?
- Your query handling is for the domain data queries, not for the tracked events, right? How about if I would like to query inside your event store for the tracked events? It has a lot of practical useabilities.
- How can Axon do the events replay?
Regarding the Axon system usage:
- The functionalities Axon is providing for me seems that Axon provides a message based wrapper for all the data transferred inside e.g., a spring boot application. Axon wraps all the query or command request/response data inside the different msgs and track all the msgs’ happening information with event sourcing. My question is: does it mean that Axon actually provide a separate layer paralleled with the specific business domain applications, you have your own event store database, your separate event sending/receiving bus, and business applications have to feed/fetch information into/from Axon if they would like to benefit from Axon framework?
Thanks again. (this email only for technical discussions for better understanding Axon system, no positive or negative arguments)
Best regards.
Qian Liu