Back to browse
GitHub Repository

Idempotency library for Java

13 starsJava

Java/Spring Boot Idempotency Library

by anaq42·May 12, 2026·4 points·1 comment

AI Analysis

MidShip It

Yet another idempotency library when Spring Retry already handles this.

Strengths
  • @Idempotent annotation makes integration trivial for Spring MVC endpoint developers
  • TTL and lock timeout configuration handles concurrent duplicate request scenarios
  • Published on Maven Central with BOM support for version alignment
Weaknesses
  • JDBC-only storage backends limit deployment to MySQL and PostgreSQL databases
  • Only 2 stars with established idempotency patterns already existing in Spring ecosystem
Target Audience

Java/Spring developers building payment or order processing endpoints

Similar To

Spring Retry · Custom idempotency implementations

Post Description

Idempotency4j is a Java idempotency library with pluggable storage backends and Spring Web / Spring Boot support.

This library solves the problem of ensuring that sensitive endpoints do not trigger side-effects multiple times - this is especially useful for any endpoints that handle financial operations. Currently, the library supports Spring MVC (Servlet-based) applications and MySQL and PostgreSQL with jdbc regarding storage backends. It is very simple to integrate, all that you have to do is add @Idempotent to any endpoints that need idempotency.

Full explanation of the functionalities and configuration is available in the readme of the repository. Repository : https://github.com/josipmusa/idempotency4j

I would love any feedback or review regarding the implementation - also, any recommendation is welcome.

Similar Projects

Security●●Solid

VPS-Harden, an Idempotent Bash Script to Harden Ubuntu VPS

If you manage small VPSes this removes the usual nail-biting: every change is previewed, the script is idempotent, and SSH edits come with automatic lockout rollback. It's a single-file, zero-deps tool with 14 modular steps (firewall, fail2ban, kernel tuning, auditd, SOPS support) and CI/ShellCheck badges — great for one-off servers, but not a fleet management replacement for Ansible or cloud-init.

Solve My ProblemNiche Gem
ranbo
213mo ago