Tagged articles

Message Idempotency

2 articles · Page 1 of 1
Java Tech Workshop
Java Tech Workshop
May 25, 2026 · Backend Development

Ensuring SpringBoot Message Idempotency to Prevent Duplicate Consumption

The article analyzes why duplicate consumption is inevitable in MQ systems, defines message idempotency, and presents four practical solutions—including Redis SETNX, database unique indexes, state‑machine with optimistic locking, and global unique constraints—along with their pros, cons, and best‑practice guidelines for SpringBoot applications.

JavaMQMessage Idempotency
0 likes · 13 min read
Ensuring SpringBoot Message Idempotency to Prevent Duplicate Consumption
Architect
Architect
Feb 14, 2021 · Backend Development

Message Idempotency and Exactly‑Once Processing in RocketMQ

This article explains why message middleware like RocketMQ guarantees at‑least‑once delivery, the resulting duplicate‑delivery problem, and presents both transaction‑based and non‑transactional idempotency solutions—including select‑for‑update, optimistic locking, and a Redis‑backed deduplication table—to achieve exactly‑once semantics in distributed systems.

DeduplicationExactly-onceMessage Idempotency
0 likes · 16 min read
Message Idempotency and Exactly‑Once Processing in RocketMQ