serialize

abstract fun serialize(sagaId: String, stepId: Long?, command: TCommand): ByteArray(source)

Serializes a compensation event envelope.

Parameters

sagaId

originating saga's id (used for Saga Log Correlation on the consumer side).

stepId

optional id of the step being compensated; null for saga-level actions.

command

typed compensation command to be encoded on the wire.