Class RecoveryMiddlewareOptions
- Namespace
- WorkflowForge.Extensions.Persistence.Recovery.Options
- Assembly
- WorkflowForge.Extensions.Persistence.Recovery.dll
Configuration options for Recovery middleware. Controls workflow recovery and retry behavior. Inherits common options functionality from WorkflowForgeOptionsBase.
public sealed class RecoveryMiddlewareOptions : WorkflowForgeOptionsBase, ICloneable
- Inheritance
-
RecoveryMiddlewareOptions
- Implements
- Inherited Members
Constructors
RecoveryMiddlewareOptions()
Initializes a new instance with default section name.
public RecoveryMiddlewareOptions()
RecoveryMiddlewareOptions(string)
Initializes a new instance with custom section name.
public RecoveryMiddlewareOptions(string sectionName)
Parameters
sectionNamestringCustom configuration section name.
Fields
DefaultSectionName
Default configuration section name for binding from appsettings.json.
public const string DefaultSectionName = "WorkflowForge:Extensions:Recovery"
Field Value
Properties
AttemptResume
Gets or sets whether to attempt workflow resumption from last checkpoint. When true, tries to resume from persisted state before fresh execution. When false, always starts fresh execution. Default is true.
public bool AttemptResume { get; set; }
Property Value
BaseDelay
Gets or sets the base delay between retry attempts. When exponential backoff is enabled, this is the initial delay. Must be greater than or equal to 0 and less than or equal to 10 minutes. Default is 1 second.
public TimeSpan BaseDelay { get; set; }
Property Value
LogRecoveryAttempts
Gets or sets whether to log recovery attempts. When true, each retry attempt is logged for debugging. When false, only final success/failure is logged. Default is true.
public bool LogRecoveryAttempts { get; set; }
Property Value
MaxRetryAttempts
Gets or sets the maximum number of retry attempts before surfacing the last error. Must be between 1 and 100. Default is 3.
public int MaxRetryAttempts { get; set; }
Property Value
UseExponentialBackoff
Gets or sets whether to use exponential backoff for retry delays. When true, delay doubles with each attempt starting from BaseDelay. When false, uses fixed BaseDelay for all attempts. Default is true.
public bool UseExponentialBackoff { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of this options instance.
public override object Clone()
Returns
- object
A new instance with the same configuration values.
Validate()
Validates the configuration settings and returns any validation errors.
public override IList<string> Validate()