Class MaterializedViewPoisonEventException
- Namespace
- Excalibur.EventSourcing
- Assembly
- Excalibur.EventSourcing.Abstractions.dll
Thrown when a materialized view replay reaches an event it cannot interpret, and halts rather than advancing past it.
public sealed class MaterializedViewPoisonEventException : InvalidOperationException, ISerializable
- Inheritance
-
MaterializedViewPoisonEventException
- Implements
- Inherited Members
Remarks
Advancing past an un-interpretable event would leave a permanent, silent gap in the view: it would read as healthy and be wrong, and nothing would report it. A halted view is loudly stopped and recoverable, so that is the failure the framework chooses.
This is not a special rule for views. Every other replay loop in this package already halts at an event it cannot interpret, and treats an erasure tombstone as the only structural skip -- a deserialization failure is never read as "assume erased", because that masks genuine corruption as erasure.
Recovery is a registration, not a code change. When the stored name belongs to a type that has since moved namespace or assembly, register the old name against the current type; to deliberately pass over an event, register the name against a type no view builder handles, which routes nowhere and applies nothing. Both are per-type and declared in configuration, rather than a global switch that would also license skipping the next genuine corruption.
Constructors
MaterializedViewPoisonEventException()
Initializes a new instance of the MaterializedViewPoisonEventException class.
public MaterializedViewPoisonEventException()
MaterializedViewPoisonEventException(string)
Initializes a new instance of the MaterializedViewPoisonEventException class.
public MaterializedViewPoisonEventException(string message)
Parameters
messagestringThe message that describes the error.
MaterializedViewPoisonEventException(string, Exception)
Initializes a new instance of the MaterializedViewPoisonEventException class.
public MaterializedViewPoisonEventException(string message, Exception innerException)
Parameters
messagestringThe message that describes the error.
innerExceptionExceptionThe exception that caused this one.
MaterializedViewPoisonEventException(string?, string, string, long, Exception)
Initializes a new instance of the MaterializedViewPoisonEventException class.
public MaterializedViewPoisonEventException(string? viewName, string eventId, string eventType, long globalPosition, Exception innerException)
Parameters
viewNamestringThe view whose replay halted, or null during a rebuild of all views.
eventIdstringThe identifier of the event that could not be interpreted.
eventTypestringThe stored type name, verbatim, as it appears in the event store.
globalPositionlongThe global stream position the replay halted at.
innerExceptionExceptionThe failure raised while resolving or deserializing the event.
Properties
EventId
Gets the identifier of the event that could not be interpreted.
public string? EventId { get; }
Property Value
EventType
Gets the stored type name, verbatim, as it appears in the event store.
public string? EventType { get; }
Property Value
GlobalPosition
Gets the global stream position the replay halted at.
public long GlobalPosition { get; }
Property Value
ViewName
Gets the view whose replay halted, or null during a rebuild of all views.
public string? ViewName { get; }