WcfClient.Resilient
8.0.1
dotnet add package WcfClient.Resilient --version 8.0.1
NuGet\Install-Package WcfClient.Resilient -Version 8.0.1
<PackageReference Include="WcfClient.Resilient" Version="8.0.1" />
paket add WcfClient.Resilient --version 8.0.1
#r "nuget: WcfClient.Resilient, 8.0.1"
// Install WcfClient.Resilient as a Cake Addin #addin nuget:?package=WcfClient.Resilient&version=8.0.1 // Install WcfClient.Resilient as a Cake Tool #tool nuget:?package=WcfClient.Resilient&version=8.0.1
WcfClient.Resilient
Provides a resilient WCF client as a web service reverse proxy built on top of GenericWcfClient, featuring support for Polly's retry actions and the circuit breaker pattern.
Configuration
builder.Services.AddWcfGenericClient<IdentityService, SoapSettings>(
config, "SoapSettings");
builder.Services.AddResilientWcfClientInstaller<IdentityService, DefaultPolicyFactory<IdentityService>>(
config, "WcfResilient");
AddWcfGenericClient
: Registers theIGenericWcfClient
for theIdentityService
.AddResilientWcfClientInstaller
: Adds resilient behavior to theGenericWcfClient
(web service proxy) for the service that implements theIdentityService
interface.
Note: The order of these registrations in the dependency injection (DI) container is important for the correct setup of resilient behavior.
Resilient Settings Example
The resilient settings for the provided example:
"WcfResilient": {
"PolicyRetryAttempts": 3,
"AsyncPolicyRetryAttempts": 3,
"RetryAttemptInMilliseconds": 2000,
"AsyncRetryAttemptInMilliseconds": 2000,
"CircuitBreakerPolicyRetryAttempts": 2,
"AsyncCircuitBreakerPolicyRetryAttempts": 2,
"CircuitBreakerRetryAttemptInMilliseconds": 180000,
"AsyncCircuitBreakerRetryAttemptInMilliseconds": 180000
}
This configuration defines the number of retry attempts and the delay between retries for both synchronous and asynchronous calls, as well as the circuit breaker thresholds.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging (>= 8.0.1)
- Polly (>= 8.4.2)
- Scrutor (>= 5.0.1)
- WcfClient.Dynamic (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added label templates on logging exceptions.