CoreSystem.Idempotency 2.0.0

dotnet add package CoreSystem.Idempotency --version 2.0.0
                    
NuGet\Install-Package CoreSystem.Idempotency -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoreSystem.Idempotency" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreSystem.Idempotency" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="CoreSystem.Idempotency" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoreSystem.Idempotency --version 2.0.0
                    
#r "nuget: CoreSystem.Idempotency, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CoreSystem.Idempotency@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoreSystem.Idempotency&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=CoreSystem.Idempotency&version=2.0.0
                    
Install as a Cake Tool

⚡ CoreSystem.Idempotency

NuGet Downloads License .NET OpenTelemetry

A production-ready idempotency framework for ASP.NET Core that guarantees exactly-once request execution for distributed applications.

CoreSystem.Idempotency transparently intercepts incoming requests, validates request fingerprints, persists successful responses through pluggable storage providers, and safely replays completed operations.

Designed around a provider-based architecture, the framework remains completely independent from the underlying persistence technology while providing built-in OpenTelemetry instrumentation and production-ready defaults.


✨ Features

  • ✅ ASP.NET Core middleware
  • ✅ Exactly-once request execution
  • ✅ Request fingerprint validation
  • ✅ Automatic response replay
  • ✅ Duplicate request detection
  • ✅ Provider-independent storage architecture
  • ✅ Configurable request fingerprinting
  • ✅ Configurable expiration
  • ✅ Configurable HTTP methods
  • ✅ Built-in OpenTelemetry metrics
  • ✅ Extensible through IIdempotencyStorage
  • ✅ Production-ready architecture

📦 Available Storage Providers

CoreSystem.Idempotency requires a storage provider.

Package Description
CoreSystem.Idempotency.Redis Redis-based distributed storage
CoreSystem.Idempotency.PostgreSql PostgreSQL-based durable storage

Additional providers can be implemented by using the IIdempotencyStorage abstraction.


🚀 Quick Start

1. Install the framework

dotnet add package CoreSystem.Idempotency

2. Install a storage provider

Redis

dotnet add package CoreSystem.Idempotency.Redis

PostgreSQL

dotnet add package CoreSystem.Idempotency.PostgreSql

3. Register the framework

builder.Services
    .AddCoreIdempotency(options =>
    {
        builder.Configuration
            .GetSection("Core:Idempotency")
            .Bind(options);
    });

Register the storage provider.

builder.Services.AddCoreIdempotencyRedis();

or

builder.Services.AddCoreIdempotencyPostgreSql();

4. Enable the middleware

app.UseCoreIdempotency();

5. Configure the framework

{
  "Core": {
    "Idempotency": {
      "Enabled": true,
      "InstanceName": "Orders",
      "Expiration": "06:00:00",
      "AllowedMethods": [
        "POST",
        "PUT"
      ]
    }
  }
}

🔒 How It Works

Incoming Request
        │
        ▼
Resolve Idempotency Key
        │
        ▼
Generate Request Fingerprint
        │
        ▼
Lookup IIdempotencyStorage
        │
  ┌─────┴─────┐
  │           │
Found      Not Found
  │           │
  ▼           ▼
Replay    Execute Endpoint
Response       │
               ▼
        Persist Response

Every duplicate request receives the original response without executing the application endpoint again.


📊 Built-in Observability

CoreSystem.Idempotency publishes OpenTelemetry metrics out of the box.

Available metrics include:

  • Request processing
  • Cache hits and misses
  • Response replay
  • Storage read latency
  • Storage write latency
  • Persisted payload size

Compatible with:

  • OpenTelemetry
  • Prometheus
  • Grafana
  • Azure Monitor
  • Jaeger
  • Elastic
  • Datadog

🏛️ Architecture

CoreSystem.Idempotency coordinates the idempotency workflow while remaining completely independent from storage implementations.

ASP.NET Core
      │
      ▼
CoreSystem.Idempotency
      │
      ▼
IIdempotencyStorage
      │
 ┌────┴────┐
 ▼         ▼

Redis   PostgreSQL

Future Providers

This provider-based architecture allows new storage implementations to be introduced without modifying the core framework.


📚 Documentation

The complete documentation includes:

  • Getting Started
  • Architecture
  • Configuration
  • Request Lifecycle
  • Fingerprinting
  • Response Replay
  • Storage Providers
  • Observability
  • Best Practices
  • Error Reference
  • Roadmap

🤝 Contributing

Contributions, bug reports, feature requests, and new storage providers are always welcome.

If you'd like to contribute:

  1. Fork the repository.
  2. Create a feature branch.
  3. Submit a Pull Request.

📄 License

MIT License © Federin Pastor Gutierrez Ortiz

Product 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CoreSystem.Idempotency:

Package Downloads
CoreSystem.Idempotency.PostgreSql

Production-ready PostgreSQL storage provider for CoreSystem.Idempotency, providing durable persistence through the IIdempotencyStorage abstraction with automatic schema creation and Dapper-based data access.

CoreSystem.Idempotency.Redis

Production-ready Redis storage provider for CoreSystem.Idempotency, providing high-performance distributed persistence through the IIdempotencyStorage abstraction.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 123 8/8/2026
1.0.4 132 8/5/2026