CoreSystem.Idempotency 2.1.0

dotnet add package CoreSystem.Idempotency --version 2.1.0
                    
NuGet\Install-Package CoreSystem.Idempotency -Version 2.1.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.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreSystem.Idempotency" Version="2.1.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.1.0
                    
#r "nuget: CoreSystem.Idempotency, 2.1.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.1.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.1.0
                    
Install as a Cake Addin
#tool nuget:?package=CoreSystem.Idempotency&version=2.1.0
                    
Install as a Cake Tool

⚡ CoreSystem.Idempotency

Production-ready idempotency for ASP.NET Core that suppresses concurrent duplicates and replays persisted responses.

CoreSystem.Idempotency is a middleware-based idempotency framework for distributed applications. It fingerprints incoming requests, persists successful responses through pluggable storage providers, and replays completed operations instead of executing them twice.

The package targets .NET 8, .NET 9 and .NET 10, and ships an assembly for each of those frameworks.

NuGet Downloads License .NET OpenTelemetry


✨ Features

  • ✅ ASP.NET Core middleware
  • ✅ Concurrent duplicate suppression
  • ✅ Response replay from persisted entries
  • ✅ Request fingerprint validation
  • ✅ Duplicate request detection
  • ✅ Provider-independent storage architecture
  • ✅ Configurable expiration, methods and fingerprinting
  • ✅ Built-in OpenTelemetry metrics
  • ✅ Extensible through IIdempotencyStorage

📦 Installation

Install the framework, then a storage provider. A provider is required.

dotnet add package CoreSystem.Idempotency
Package Purpose
CoreSystem.Idempotency.Redis Redis-based distributed storage
CoreSystem.Idempotency.PostgreSql PostgreSQL-based durable storage

Additional providers can be implemented through the IIdempotencyStorage abstraction.


🚀 Quick Start

Register the framework.

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

Register a storage provider. Both providers require a configuration delegate.

builder.Services.AddCoreIdempotencyRedis(options =>
{
    options.Configuration = redis =>
    {
        redis.EndPoints.Add("localhost:6379");
    };
});
builder.Services.AddCoreIdempotencyPostgreSql(options =>
{
    options.ConnectionString =
        builder.Configuration.GetConnectionString("Idempotency");
});

Enable the middleware.

app.UseCoreIdempotency();

Configure through the Core:Idempotency section.

{
  "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

OpenTelemetry metrics are published out of the box: request processing, cache hits and misses, response replay, storage read and write latency, and persisted payload size.

Compatible with OpenTelemetry, Prometheus, Grafana, Azure Monitor, Jaeger, Elastic and 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

  • Getting Started
  • Architecture and configuration
  • Storage providers: Redis, PostgreSQL
  • Delivery guarantees
  • Fingerprinting and response replay
  • Observability and error reference

🤝 Contributing

Contributions, bug reports, feature requests and new storage providers are always welcome. Fork the repository, create a feature branch, and open a pull request.


📄 License

Released under the MIT License.

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 is compatible.  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 is compatible.  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 Dapper-based data access. Ships an idempotent schema script at scripts/postgres.sql.

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.1.0 0 10/27/2026
2.0.2 139 10/18/2026
2.0.1 186 10/14/2026
2.0.0 432 8/8/2026
1.0.4 174 8/5/2026

2.1.0: Multi-targeting release. The package now ships net8.0, net9.0 and net10.0 assets instead of net8.0 only, so a project on .NET 9 or .NET 10 gets an assembly compiled for its own target framework.
Dependency refresh. No code or API changes.
CoreSystem.Observability.Abstractions 1.0.1 to 1.0.2,
CoreSystem.Serialization 1.2.3 to 1.2.4 and
OpenTelemetry.Extensions.Hosting 1.19.0 to 1.20.0, plus the refreshed
transitive graph. The declared dependency floors now match the versions
the assembly was built and tested against.