CoreSystem.Idempotency 1.0.0

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

⚡ CoreSystem.Idempotency

NuGet Downloads License .NET OpenTelemetry Storage


📖 Overview

CoreSystem.Idempotency is a production-ready idempotency framework for ASP.NET Core that guarantees critical operations are executed exactly once, even when clients retry requests because of timeouts, network failures, or duplicate submissions.

The framework transparently intercepts incoming requests, validates request fingerprints, persists successful responses, and safely replays previously completed operations.

Designed for distributed systems, it provides provider-independent storage, built-in OpenTelemetry instrumentation, and a highly extensible architecture.


✨ Features

  • ✅ ASP.NET Core middleware
  • ✅ Exactly-once request processing
  • ✅ Response replay
  • ✅ Request fingerprint validation
  • ✅ Duplicate request detection
  • ✅ Redis provider
  • ✅ PostgreSQL provider
  • ✅ Configurable expiration
  • ✅ Configurable HTTP methods
  • ✅ Configurable request fingerprinting
  • ✅ OpenTelemetry Metrics
  • ✅ Production-ready architecture

🚀 Quick Start

Install the package

dotnet add package CoreSystem.Idempotency

Register the services

builder.Services.AddIdempotencyProvider(builder.Configuration);

Enable the middleware

app.UseIdempotency();

Configure the provider

{
  "Idempotency": {
    "Enabled": true,
    "Provider": "Redis",
    "HeaderName": "X-Idempotency-Key",
    "AllowedMethods": [ "POST", "PUT", "DELETE" ],
    "Expiration": "06:00:00"
  }
}

That's all.


🔒 How It Works

  1. The client sends a request with an Idempotency-Key.
  2. The middleware checks the configured storage provider.
  3. If the key already exists:
    • The request fingerprint is validated.
    • The stored response is replayed.
  4. Otherwise:
    • The request executes normally.
    • The response is persisted.
    • Future retries return the stored response.

📦 Supported Providers

Provider Status
Redis
PostgreSQL

📊 Observability

CoreSystem.Idempotency publishes OpenTelemetry metrics out of the box.

Available telemetry includes:

  • Request processing
  • Duplicate detection
  • Response replay
  • Storage latency
  • Payload size

Compatible with:

  • OpenTelemetry
  • Prometheus
  • Grafana
  • Jaeger

📚 Documentation

Complete documentation is available in the project documentation.

It includes:

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

🤝 Contributing

Contributions, bug reports, and feature requests are 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 0 7/28/2026