AggregateCommandDispatcher
Aggregate command dispatcher grouped by named aggregate.
This dispatcher manages command processing for a specific named aggregate, ensuring proper parallelism and thread affinity. Each aggregate ID is bound to one worker thread, but one worker can handle multiple aggregate IDs, providing efficient resource utilization.
Key characteristics:
One AggregateId binds to one Worker (Thread)
One Worker can be bound by multiple aggregateIds
Workers have aggregate ID affinity for consistent processing
Parameters
The type of the command aggregate root.
The type of the state aggregate.
The level of parallelism for message processing.
The scheduler for handling messages.
The flux of command exchanges to process.
The name of this dispatcher.
Factory for creating aggregate processors.
The command handler for processing commands.
Provider for accessing services.
Constructors
Properties
Functions
Creates an AggregateId for this NamedAggregate with the specified parameters.
Finds the aggregate type class associated with this named aggregate.
Converts this NamedAggregate to its corresponding AggregateMetadata.
Generates a unique ID string for this NamedAggregate.
Gets the context alias prefix for this bounded context.
Handles a single command exchange by setting up the processing context and delegating to the command handler.
Checks if the named aggregate is available locally at runtime.
Materializes this NamedAggregate into a MaterializedNamedAggregate.
Finds the aggregate type class associated with this named aggregate, throwing an exception if not found.
Safely processes the next message.
Handles errors that occur during message processing.
Extension function to convert a NamedAggregate to an EventNamedAggregate.
Generates a group key for the command exchange to ensure proper parallelism and ordering.
Converts this NamedAggregate to its string representation.
Converts this NamedAggregate to a string representation using the context alias.