Interface IResilientRequest
- Namespace
- Stratara.Abstractions.Resilience
- Assembly
- Stratara.Abstractions.dll
Opt-in marker for a mediator request (ICommand, ICommand<TResult>, or IQuery<TResult>) whose in-process dispatch should be wrapped in a named Polly resilience pipeline — retry, timeout, circuit-breaker — applied by the Stratara resilience pipeline behavior.
public interface IResilientRequest
- Extension Methods
Remarks
The marker is inert until a consumer registers the resilience behavior
(AddStrataraResilienceBehavior()) and the named pipelines
(AddResiliencePipelines(), or its own AddResiliencePipeline(name, ...)
registrations). Requests that do not implement it pass through the behavior untouched.
Side-effect caution: a retrying pipeline re-invokes the handler, so only mark requests whose handler is safe to re-run — naturally idempotent work, or operations guarded by optimistic concurrency (point ResiliencePipelineName at a pipeline that retries only on a concurrency conflict). Do not mark a request whose handler is not idempotent with a blanket retry-on-any-exception pipeline.
Properties
ResiliencePipelineName
The name of the registered Polly resilience pipeline to apply, resolved via
ResiliencePipelineProvider<string>.GetPipeline(name). Use one of the built-in
ResilienceNames constants or a consumer-registered pipeline name.
string ResiliencePipelineName { get; }