Skip to content

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.

EricksonLopez.Idempotency Overview

EricksonLopez.Idempotency (2.0.0 on NuGet, L2) enforces exactly-once logical execution across retries, timeouts, and concurrent duplicate requests using distributed leases and SHA-256 payload fingerprinting.

  • Atomic lease + fingerprint check: IdempotencyEngine.ExecutePipelineAsync guarantees a single in-flight executor per (TenantId, Scope, IdempotencyKey) while rejecting payload drift (FingerprintMismatch).
  • Response header sanitization (v2.0.0): IdempotencyOptions.ResponseHeadersBlocklist strips sensitive headers (Set-Cookie, Authorization, etc.) before persisting replayable responses (SEC-001).
  • Strict key & scope bounds: IdempotencyKey (1..128 chars) and IdempotencyScope (1..64 chars) are readonly record struct value types; malformed keys return HTTP 400 (RFC 9110) instead of 500.
  • Cross-family adoption: Directly consumed by EricksonLopez.Outbox and EricksonLopez.Messaging.
flowchart LR
Req["Request + IdempotencyKey + Fingerprint"] --> Eng["IdempotencyEngine"]
Eng -- New Key --> Lease["Acquire Lease -> Execute Delegate"]
Lease --> Save["Persist ExecutionResponse"]
Eng -- Completed + Same Fingerprint --> Replay["Replay Stored ExecutionResponse"]
Eng -- Completed + Different Fingerprint --> Mis["FingerprintMismatch"]
Eng -- Active Lease --> Conf["InFlightConflict"]
Idempotency Lease and Replay State MachineIncoming request enters IdempotencyEngine with key and SHA-256 fingerprint, either executing once under an active lease, replaying a stored ExecutionResponse, or failing on InFlightConflict or FingerprintMismatch.
View accessible text summary and structure

Incoming request enters IdempotencyEngine with key and SHA-256 fingerprint, either executing once under an active lease, replaying a stored ExecutionResponse, or failing on InFlightConflict or FingerprintMismatch.

flowchart LR
Req["Request + IdempotencyKey + Fingerprint"] --> Eng["IdempotencyEngine"]
Eng -- New Key --> Lease["Acquire Lease -> Execute Delegate"]
Lease --> Save["Persist ExecutionResponse"]
Eng -- Completed + Same Fingerprint --> Replay["Replay Stored ExecutionResponse"]
Eng -- Completed + Different Fingerprint --> Mis["FingerprintMismatch"]
Eng -- Active Lease --> Conf["InFlightConflict"]

All 13 packages are published at 2.0.0 on NuGet (6,193 total downloads; localVersion: 3.1.0 on disk), target net8.0;net9.0;net10.0, and set IsAotCompatible=true / EnableTrimAnalyzer=true (Full AOT):

  • Core & Abstractions: EricksonLopez.Idempotency (622 dl), EricksonLopez.Idempotency.Abstractions (2,548 dl).
  • Web, Mediator, Result & Testing: AspNetCore (267 dl), Mediator (275 dl), Result (266 dl), Testing (285 dl).
  • Stores: MySql (317 dl), MariaDb (281 dl), PostgreSql (277 dl), Redis (273 dl), Oracle (270 dl — runtime note: ODP.NET Oracle.ManagedDataAccess.Core uses reflection at runtime), Sqlite (258 dl), SqlServer (254 dl).

Benchmark Status: hasBenchmarks: false — no BenchmarkDotNet reports are published for dotnet-idempotency.