Concept level fit for Axon framework,,,


what can axon framework fit in the concept level. is it paralleled with the entity/repository level concepts to provide a machanism for the event sourcing/audit trail or what? which means in the application, provide another layer for the event histories?

Hi Qian Liu,

I would say Axon is paralleled with a Service (Aggregate’s CommandHandlers and EventSourcingHandlers) and Repository (After EventSourceHandler, event is persisted in Event Store) layer. Your flow will go to one or both of the following paths after Command -> Aggregate’s EventSourcingHandler -> Publish to Event Bus.

  1. Update aggregate values, and store event in event store. (this one always happens)
  2. Event is caught by @EventHandlers, and for example, notification is sent, event is persisted in a relational database, data warehouse, etc… (this is of course, optional, and depends on your usages)

To add onto my answer,

I believe you may also relate the Aggregates to being a state machine of your Entities.