hyperlane-plugin-idempotency 23.0.0

A production HTTP Idempotency-Key middleware plugin for the Hyperlane framework featuring XxHash3_64 request fingerprinting (422 mismatch), 64-way sharded bounded InMemoryIdempotencyStore + async IdempotencyStore trait, InFlight concurrent duplicate guard (409 Conflict), and zero-copy cached response replay with Idempotent-Replayed headers.
Documentation

hyperlane-plugin-idempotency

HTTP Idempotency-Key Replay & Concurrent Duplicate Guard Plugin

crates.io docs.rs Rust 2024 License: MIT

Workspace Overview · Plugin Catalog · API Docs


Overview

Opt-in request (-78) and response (-60) middleware enforcing Idempotency-Key semantics for HTTP mutation methods (POST/PUT/PATCH/DELETE): single-pass XxHash3_64 (method, path, body) request fingerprinting (422 Unprocessable Entity on payload mismatch), 64-way sharded bounded InMemoryIdempotencyStore plus pluggable async IdempotencyStore trait, atomic InFlight duplicate locking (409 Conflict) with RAII panic/drop cleanup, and zero-copy prebuilt response replay stamped with Idempotent-Replayed: true.

This crate is a member of the hyperlane unified Rust 2024 workspace. All plugin crates are opt-in and transparent (Status::Continue) when unconfigured.

Responsibilities & Module Layout

  • struct / enum / trait / impl — IdempotencyConfig, IdempotencyStore, InMemoryIdempotencyStore, StoredIdempotentResponse, IdempotencyPlugin, IdempotencyRequestHook (-78), and IdempotencyResponseHook (-60)
  • fn — Zero-allocation XxHash3_64 request fingerprinting, shard hashing, and wire replay construction

Installation

cargo add hyperlane-plugin-idempotency

Verification

Run crate-scoped formatting, lint, and test gates from the workspace root:

cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-plugin-idempotency --all-features --all-targets -- -D warnings
cargo test -p hyperlane-plugin-idempotency --all-features

Documentation & Governance

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For inquiries, please contact the author at root@devhub.vip.