receipt

fun receipt(rejected: CommandReceipt.Rejected<*>, trace: Map<String, String> = emptyMap(), wait: WaitContext? = null): TopicMessage

The receipt of rejected, carrying the propagation fields of its trace and the wait of the command it answers past its commit, if any.


fun receipt(committed: CommandReceipt.Committed<*>, trace: Map<String, String> = emptyMap(), wait: WaitContext? = null): TopicMessage

The success receipt of committed: id is the command's id, as a rejection's, and payload {commandId, commandType, ref, version, result, causation, executionId, operator, scope, headers}, without the state, carrying the propagation fields of its trace and, in its transport, the wait of the command it answers past its commit: the rest of the chain, whose next hop is the saga's @OnCommitted handler.