DomainEvent

DomainEvent .

Events published when a command is processed by the aggregate

由聚合发布的领域事件 .

领域事件推荐使用声明式(Declarative)设计的方式(幂等,类似于 Kubernetes apply、Docker 镜像层) 即聚合根在事件朔源时只需要简单的将领域事件作为覆盖层(onSourcing 只对状态赋值,没有逻辑判断), 事件朔源将可以不需要显式定义朔源函数。

Author

ahoo wang

Properties

Link copied to clipboard
abstract override val aggregateId: AggregateId
Link copied to clipboard
abstract val aggregateName: String

aggregate name.

Link copied to clipboard
abstract val body: T
Link copied to clipboard
abstract val commandId: String
Link copied to clipboard
abstract val contextName: String
Link copied to clipboard
abstract val createTime: Long
Link copied to clipboard
abstract val header: Header
Link copied to clipboard
abstract val id: String

id.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isLast: Boolean

是否为事件流的最后一个事件

Link copied to clipboard
Link copied to clipboard
abstract val name: String
Link copied to clipboard
open override val revision: String
Link copied to clipboard
open val sequence: Int
Link copied to clipboard
abstract val version: Int

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun withHeader(additionalSource: Map<String, String>): DomainEvent<T>

合并 header 并返回一个新的 Message.

open fun withHeader(key: String, value: String): DomainEvent<T>
Link copied to clipboard