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.
The builder exposes the command body, aggregate targeting, ownership and space information, optimistic-concurrency version, headers, creation time, and optional upstream event.
See also
Inheritors
Properties
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.