Skip to content

⚑ CoreSystem.Idempotency¢

CoreSystem.Idempotency is a production-ready idempotency library for ASP.NET Core and .NET 8.

NuGet Downloads License .NET OpenTelemetry

It guarantees that critical operations are executed exactly once, even when clients retry requests because of timeouts, network failures, or duplicate submissions.

The framework provides request fingerprinting, response replay, OpenTelemetry integration, and a provider-based architecture that enables pluggable storage providers.


✨ Features¢

  • Middleware-based idempotency for ASP.NET Core
  • Exactly-once request execution
  • Response capture and replay
  • Request fingerprint validation
  • Provider-based storage architecture
  • Extensible through IIdempotencyStorage
  • Built-in OpenTelemetry metrics
  • Storage-provider independent design

πŸ“¦ Package ArchitectureΒΆ

CoreSystem.Idempotency contains the middleware and the orchestration logic.

Storage providers are distributed as independent packages.

Package Responsibility
CoreSystem.Idempotency Middleware, request fingerprinting, response replay, storage abstractions, and orchestration
CoreSystem.Idempotency.Redis Redis storage provider
CoreSystem.Idempotency.PostgreSql PostgreSQL storage provider
CoreSystem.Serialization JSON, MessagePack, and Protocol Buffers serialization
CoreSystem.Http HTTP abstractions used by the middleware
CoreSystem.Redis Redis connectivity infrastructure used by the Redis provider
CoreSystem.Observability (Optional) OpenTelemetry metrics, tracing, and diagnostics
CoreSystem.Observability.Abstractions Shared observability contracts

CoreSystem.Idempotency requires a storage provider.

Choose one of the available provider packages:

  • CoreSystem.Idempotency.Redis
  • CoreSystem.Idempotency.PostgreSql

Optional: Install CoreSystem.Observability to enable built-in OpenTelemetry metrics and tracing.


πŸ›οΈ High-Level ArchitectureΒΆ

flowchart TD App["ASP.NET Core Application"] App --> Core["CoreSystem.Idempotency"] Core --> Storage["IIdempotencyStorage"] Storage --> Redis["Core.Idempotency.Redis"] Storage --> PostgreSql["Core.Idempotency.PostgreSql"] Storage -.-> Custom["Custom Provider"]

πŸ“š DocumentationΒΆ

  • πŸš€ Getting Started
  • ❓ Why CoreSystem.Idempotency?
  • πŸ—οΈ Architecture
  • βš™οΈ Configuration
  • πŸ—„οΈ Storage Providers
  • πŸ” Fingerprinting
  • ♻️ Response Replay
  • πŸ“Š Observability
  • ❌ Errors
  • βœ… Best Practices
  • πŸ›£οΈ Roadmap