Interface IOccurrenceHandler<TTrigger>
- Namespace
- Cratis.Chronicle.Occurrences
- Assembly
- Cratis.Chronicle.dll
Handles at-least-once delivery of a typed trigger. Use effect receipts for Chronicle writes and effect keys for external calls.
public interface IOccurrenceHandler<in TTrigger>
Type Parameters
TTriggerThe type marked with TriggerAttribute.
- Extension Methods
Methods
Handle(TTrigger, OccurrenceContext, CancellationToken)
Handles one leased attempt. Honor cancellation when the connection, lease or client lifetime ends.
Task Handle(TTrigger trigger, OccurrenceContext context, CancellationToken cancellationToken)
Parameters
triggerTTriggerThe recorded plaintext payload.
contextOccurrenceContextThe durable identity and current attempt.
cancellationTokenCancellationTokenCancellation for the attempt.
Returns
- Task
The asynchronous handler work.