Class MongoDbStalePositionException
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
eventArgsCdcPositionResetEventArgsThe stale position event arguments.
MongoDbStalePositionException(string)
Initializes a new instance of the MongoDbStalePositionException class with a specified error message.
public MongoDbStalePositionException(string message)
Parameters
messagestringThe 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
messagestringThe error message.
eventArgsCdcPositionResetEventArgsThe 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
Properties
CollectionName
Gets the name of the affected collection.
public string? CollectionName { get; }
Property Value
DatabaseName
Gets the name of the affected database.
public string? DatabaseName { get; }