CommandBuilder
Builder interface for constructing command messages.
CommandBuilder provides a fluent API for building command messages with all necessary properties like aggregate targeting, headers, and timing information. It supports method chaining for easy construction of complex command messages.
See also
Inheritors
Properties
the target aggregate instance identifier (optional)
expected version for optimistic concurrency (optional)
timestamp when the command was created
the named aggregate information (optional)
whether owner ID should match aggregate ID
the domain event that triggered this command (optional)
Functions
Sets the target aggregate instance identifier.
Sets the expected aggregate version for optimistic concurrency control.
Sets the command body/payload.
Sets the creation timestamp for the command message.
Customizes the message header using a lambda function.
Sets the message header containing additional metadata.
Sets the unique identifier for the command message.
Enables or disables local-first processing mode.
Sets the named aggregate information for the command target.
Sets the owner identifier of the aggregate.
Sets whether the owner ID should be the same as the aggregate ID.
Sets the request identifier for tracking related commands.
Sets the request ID only if it's not already set.
Sets the tenant identifier for multi-tenancy support.
Sets the tenant ID only if it's not already set.
Converts a CommandBuilder to a CommandMessage.
Sets the upstream domain event that triggered this command.