Table of Contents

Class MongoDbStalePositionException

Namespace
Excalibur.Cdc.MongoDB
Assembly
Excalibur.Cdc.MongoDB.dll

Exception thrown when the MongoDB CDC processor detects a stale resume token position that cannot be recovered automatically.

public sealed class MongoDbStalePositionException : CdcStalePositionException, ISerializable
Inheritance
MongoDbStalePositionException
Implements
Inherited Members

Remarks

This exception is thrown in the following scenarios:

  • The recovery strategy is Throw
  • The maximum recovery attempts have been exhausted
  • The callback strategy throws or fails to provide a valid new position

The EventArgs property contains detailed information about the stale position, including the reason code, affected positions, and original exception.

Constructors

MongoDbStalePositionException()

Initializes a new instance of the MongoDbStalePositionException class.

public MongoDbStalePositionException()

MongoDbStalePositionException(CdcPositionResetEventArgs)

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

public MongoDbStalePositionException(CdcPositionResetEventArgs eventArgs)

Parameters

eventArgs CdcPositionResetEventArgs

The stale position event arguments.

MongoDbStalePositionException(string)

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

public MongoDbStalePositionException(string message)

Parameters

message string

The error message.

MongoDbStalePositionException(string, CdcPositionResetEventArgs)

Initializes a new instance of the MongoDbStalePositionException class with a custom message and event arguments.

public MongoDbStalePositionException(string message, CdcPositionResetEventArgs eventArgs)

Parameters

message string

The error message.

eventArgs CdcPositionResetEventArgs

The stale position event arguments.

MongoDbStalePositionException(string, Exception)

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

public MongoDbStalePositionException(string message, Exception innerException)

Parameters

message string

The error message.

innerException Exception

The inner exception.

Properties

CollectionName

Gets the name of the affected collection.

public string? CollectionName { get; }

Property Value

string

The collection name, or null if not available.

DatabaseName

Gets the name of the affected database.

public string? DatabaseName { get; }

Property Value

string

The database name, or null if not available.