CoreSystem.Idempotency
1.0.0
dotnet add package CoreSystem.Idempotency --version 1.0.0
NuGet\Install-Package CoreSystem.Idempotency -Version 1.0.0
<PackageReference Include="CoreSystem.Idempotency" Version="1.0.0" />
<PackageVersion Include="CoreSystem.Idempotency" Version="1.0.0" />
<PackageReference Include="CoreSystem.Idempotency" />
paket add CoreSystem.Idempotency --version 1.0.0
#r "nuget: CoreSystem.Idempotency, 1.0.0"
#:package CoreSystem.Idempotency@1.0.0
#addin nuget:?package=CoreSystem.Idempotency&version=1.0.0
#tool nuget:?package=CoreSystem.Idempotency&version=1.0.0
⚡ CoreSystem.Idempotency
📖 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
- The client sends a request with an Idempotency-Key.
- The middleware checks the configured storage provider.
- If the key already exists:
- The request fingerprint is validated.
- The stored response is replayed.
- 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:
- Fork the repository.
- Create a feature branch.
- Submit a Pull Request.
📄 License
MIT License © Federin Pastor Gutierrez Ortiz
| Product | Versions 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. |
-
net8.0
- CoreSystem.Http (>= 1.0.4)
- CoreSystem.Observability.Abstractions (>= 1.0.0)
- CoreSystem.Redis (>= 1.0.0)
- CoreSystem.Serialization (>= 1.2.0)
- Dapper (>= 2.1.79)
- MessagePack (>= 3.1.8)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.28)
- Microsoft.Extensions.Options (>= 8.0.2)
- Npgsql (>= 8.0.3)
- OpenTelemetry (>= 1.15.3)
- OpenTelemetry.Api (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
- protobuf-net (>= 3.2.56)
- protobuf-net.Core (>= 3.2.56)
- StackExchange.Redis (>= 2.13.1)
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 |