Table of Contents

Struct CdcFatalDecision

Namespace
Excalibur.Cdc
Assembly
Excalibur.Cdc.dll

The decision a CDC processor's consume loop must act on after each iteration: whether it may advance its durable checkpoint and whether it must stop.

public readonly record struct CdcFatalDecision : IEquatable<CdcFatalDecision>
Implements
Inherited Members

Remarks

Produced exclusively by Decide(Exception?, IMessageFailureClassifier?). The safety invariant — a fatal (or transient) fault never advances the durable checkpoint past the unprocessed change — is enforced by the idiom native to each provider class:

  • Poll-batch providers (Cosmos, DynamoDb) gate the durable advance literally on AdvanceCheckpoint (if (decision.AdvanceCheckpoint) { …Confirm… }), reached on both the success and the captured-fault path, so the if(true) mutant advances past a failed change and turns the field-gate lock RED — structurally non-vacuous.
  • Streaming providers (Postgres, Mongo) enforce the same invariant by confirm-site placement at the transaction-commit / invalidation boundary: a mid-batch fault unwinds out of the consume method before the confirm site is reachable. A field-gate there would be vacuous (the confirm point never sees a Decide(Exception?, IMessageFailureClassifier?)-evaluated fault), so the placement is regression-locked by the non-skipped real-infra restart-redelivery test instead.

A "reconnect-on-transient" signal is intentionally NOT a field here: it is the implicit else of a non-fatal fault (Stop is false); a future reconnect-policy knob would be a tracked feature bead, not a silent unread field.

Constructors

CdcFatalDecision(bool, bool)

The decision a CDC processor's consume loop must act on after each iteration: whether it may advance its durable checkpoint and whether it must stop.

public CdcFatalDecision(bool AdvanceCheckpoint, bool Stop)

Parameters

AdvanceCheckpoint bool

true only on the clean-success path; false on ANY fault (fatal or transient) so the durable checkpoint is never advanced past an unprocessed change.

Stop bool

true when the fault is fatal (non-retryable) — the processor stops loudly rather than silently reconnecting forever. When false on a fault, the loop reconnects and retries from the (un-advanced) checkpoint.

Remarks

Produced exclusively by Decide(Exception?, IMessageFailureClassifier?). The safety invariant — a fatal (or transient) fault never advances the durable checkpoint past the unprocessed change — is enforced by the idiom native to each provider class:

  • Poll-batch providers (Cosmos, DynamoDb) gate the durable advance literally on AdvanceCheckpoint (if (decision.AdvanceCheckpoint) { …Confirm… }), reached on both the success and the captured-fault path, so the if(true) mutant advances past a failed change and turns the field-gate lock RED — structurally non-vacuous.
  • Streaming providers (Postgres, Mongo) enforce the same invariant by confirm-site placement at the transaction-commit / invalidation boundary: a mid-batch fault unwinds out of the consume method before the confirm site is reachable. A field-gate there would be vacuous (the confirm point never sees a Decide(Exception?, IMessageFailureClassifier?)-evaluated fault), so the placement is regression-locked by the non-skipped real-infra restart-redelivery test instead.

A "reconnect-on-transient" signal is intentionally NOT a field here: it is the implicit else of a non-fatal fault (Stop is false); a future reconnect-policy knob would be a tracked feature bead, not a silent unread field.

Properties

AdvanceCheckpoint

true only on the clean-success path; false on ANY fault (fatal or transient) so the durable checkpoint is never advanced past an unprocessed change.

public bool AdvanceCheckpoint { get; init; }

Property Value

bool

Stop

true when the fault is fatal (non-retryable) — the processor stops loudly rather than silently reconnecting forever. When false on a fault, the loop reconnects and retries from the (un-advanced) checkpoint.

public bool Stop { get; init; }

Property Value

bool