Aggregates
Aggregates are a core concept in Domain-Driven Design (DDD) and event sourcing. Arc provides seamless integration with Chronicle’s aggregate roots, offering automatic dependency injection and event tracking.
What are Aggregates?
Section titled “What are Aggregates?”An aggregate is a cluster of domain objects that can be treated as a single unit. The aggregate root is the entry point to the aggregate and ensures the consistency of changes within the aggregate boundary.
Key Features
Section titled “Key Features”- Automatic Registration: Aggregate roots are automatically discovered and registered in the dependency injection container
- Event Source ID Resolution: Automatic resolution of aggregate instances based on the event source ID from command context
- Change Tracking: Automatic tracking of changes and events generated by aggregate roots
- Transient Lifecycle: Each request gets a fresh instance tied to a specific event source ID
Topics
Section titled “Topics”- Aggregate Roots - How to use aggregate roots with dependency injection and event sourcing
- Aggregate Root - Defining and implementing aggregate roots