@nestjs-pipeline/idempotency
v0.4.3
Published
Idempotency behavior for the NestJS pipeline — atomically excludes concurrent duplicates and replays stored successful responses per idempotency key, via a pluggable store (in-memory default, Redis/Postgres drop-in).
Downloads
1,209
Maintainers
Readme
@nestjs-pipeline/idempotency
From 0.5.0 this package continues as
@cqrs-ddd/pipeline-idempotency. Its code, issues and releases are in ddd-cqrs, documented at aristoteliss.github.io/ddd-cqrs. NestJS applications add@cqrs-ddd/nestjs. Versions 0.1 to 0.4 of@nestjs-pipeline/idempotencystay on npm unchanged, and 0.4.x receives fixes only.
Idempotency behavior for @nestjs-pipeline/core — atomically deduplicates concurrent requests sharing an idempotency key and replays the stored response after a successful execution. With the default releaseOnError: true, failed executions release the key so a later retry may execute the handler again.
Documentation: guide · API reference · all packages
Installation
pnpm add @nestjs-pipeline/idempotencyPeer dependencies:
pnpm add @nestjs-pipeline/core @nestjs/common @nestjs/core reflect-metadataRequires Node.js 22.12 or later, @nestjs/common and @nestjs/core ^12.1.0, and @nestjs-pipeline/core ^0.4.2.
Published as an ES module; a CommonJS application loads it with require(). Coming from 0.3.x, see Upgrading from 0.3.x.
License
Dual-licensed under AGPL-3.0-or-later or a Commercial License. See LICENSE and COMMERCIAL_LICENSE.txt.
