CommandAggregate

Represents a command aggregate that processes commands and manages state transitions.

A command aggregate subscribes to command messages, validates business rules using the current state from the state aggregate, and publishes domain events. It coordinates between command processing and state management.

Key responsibilities:

  1. Subscribe to command messages

  2. Validate business rules using state aggregate's current state

  3. Publish domain events

Type Parameters

C

The type of the command aggregate root.

S

The type of the state aggregate. The state contains the current aggregate state, commandRoot is the command aggregate root, and commandState tracks the current command-processing state.

Inheritors

Properties

Link copied to clipboard
open override val aggregateId: AggregateId
Link copied to clipboard
abstract val commandRoot: C
Link copied to clipboard
Link copied to clipboard
abstract val state: StateAggregate<S>
Link copied to clipboard
open override val version: Int