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

TTrigger

The 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

trigger TTrigger

The recorded plaintext payload.

context OccurrenceContext

The durable identity and current attempt.

cancellationToken CancellationToken

Cancellation for the attempt.

Returns

Task

The asynchronous handler work.