pub trait CompensationHook: Send + Sync {
// Required method
fn compensate<'life0, 'async_trait>(
&'life0 self,
context: CompensationContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Compensation hook contract for irreversible side effects.
Production-stable since 0.12 (M156). Implement and register this hook
via CompensationHandle to define rollback actions when an Axon pipeline
faults after committing external side effects.