Table of Contents

Class CdcStalePositionException

Namespace
Excalibur.Cdc
Assembly
Excalibur.Cdc.dll

Base exception for all CDC stale position scenarios across providers.

public class CdcStalePositionException : ResourceException, ISerializable
Inheritance
CdcStalePositionException
Implements
Derived
Inherited Members

Remarks

Consumers can catch this base type to handle stale position errors generically, regardless of the underlying CDC provider (SqlServer, Postgres, CosmosDB, DynamoDB, Firestore, MongoDB). Provider-specific subclasses contain additional provider-specific recovery information.

A stale position occurs when the CDC processor's saved checkpoint (LSN, resume token, sequence number, etc.) is no longer valid in the source database. This typically happens due to log truncation, backup/restore, or stream expiration.

Constructors

CdcStalePositionException()

Initializes a new instance of the CdcStalePositionException class.

public CdcStalePositionException()

CdcStalePositionException(CdcPositionResetEventArgs)

Initializes a new instance of the CdcStalePositionException class with the specified event arguments.

public CdcStalePositionException(CdcPositionResetEventArgs eventArgs)

Parameters

eventArgs CdcPositionResetEventArgs

The stale position event arguments.

CdcStalePositionException(string)

Initializes a new instance of the CdcStalePositionException class with a specified error message.

public CdcStalePositionException(string message)

Parameters

message string

The error message.

CdcStalePositionException(string, Exception?)

Initializes a new instance of the CdcStalePositionException class with a specified error message and inner exception.

public CdcStalePositionException(string message, Exception? innerException)

Parameters

message string

The error message.

innerException Exception

The inner exception.

Properties

EventArgs

Gets the event arguments containing details about the stale position scenario.

public CdcPositionResetEventArgs? EventArgs { get; protected set; }

Property Value

CdcPositionResetEventArgs

The CdcPositionResetEventArgs with detailed information, or null if not provided.

ProcessorId

Gets the processor ID that detected the stale position.

public string? ProcessorId { get; }

Property Value

string

The processor ID, or null if not available.

ReasonCode

Gets the reason code for the stale position.

public string? ReasonCode { get; }

Property Value

string

The reason code, or null if not available.

StalePosition

Gets the stale position that was detected.

public byte[]? StalePosition { get; }

Property Value

byte[]

The stale position as bytes, or null if not available.