Class CdcStalePositionException
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
eventArgsCdcPositionResetEventArgsThe stale position event arguments.
CdcStalePositionException(string)
Initializes a new instance of the CdcStalePositionException class with a specified error message.
public CdcStalePositionException(string message)
Parameters
messagestringThe 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
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
ReasonCode
Gets the reason code for the stale position.
public string? ReasonCode { get; }
Property Value
StalePosition
Gets the stale position that was detected.
public byte[]? StalePosition { get; }