Skip to main content
Table of Contents

Class PrecedingFactMissingException

Namespace
Stratara.Abstractions.EventSourcing
Assembly
Stratara.Abstractions.dll

Reports that the entity a fact refers to does not exist in the handler's read model yet, so the fact cannot be applied until the fact that created the entity has been.

public sealed class PrecedingFactMissingException : Exception, ISerializable
Inheritance
PrecedingFactMissingException
Implements
Inherited Members
Extension Methods

Remarks

Throw it from a projection or saga handler where the row a fact updates is absent. The framework treats it unlike any other failure: the projection and saga workers retry the bundle in-process a bounded number of times with a short backoff — about three seconds in total — holding no aggregate lock while they wait, so the creating fact can be applied in between. Only once the retries are exhausted does the bundle fail as an unhandled failure does. Across the consumers of one subscription the framework does not promise that a fact arrives after the fact that precedes it; this exception is how a handler tolerates that without acknowledging a fact it never applied.

Constructors

PrecedingFactMissingException(Guid, string, Exception?)

Initializes the exception for the fact that could not be applied yet.

public PrecedingFactMissingException(Guid streamId, string eventTypeName, Exception? innerException = null)

Parameters

streamId Guid

The stream the fact belongs to.

eventTypeName string

The type name of the fact that was being applied.

innerException Exception

The failure that revealed the absence, if any.

Properties

EventTypeName

The type name of the fact that was being applied.

public string EventTypeName { get; }

Property Value

string

StreamId

The stream the fact belongs to.

public Guid StreamId { get; }

Property Value

Guid