# On Idempotency Keys

DevFeed: [On Idempotency Keys](<https://devfeed.tech/articles/on-idempotency-keys-18854.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/on-idempotency-keys/>)

Published: 2025-11-25T12:10:00Z

Content type: tutorial

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [systems](<https://devfeed.tech/tags/systems.md>)

## AI overview

The article explains how idempotency keys enable exactly-once processing despite duplicate message delivery. Consumers compare keys, atomically persist the key with the processed message or derived view, and skip recognized duplicates. It also discusses UUIDv4, UUIDv7, and ULID trade-offs for retaining and aging keys.

## Source excerpt

Table of Contents UUIDs Monotonically Increasing Sequences Deriving Idempotency Keys From the Transaction Log Discussion In distributed systems, there's a common understanding that it is not possible to guarantee exactly-once delivery of messages. What is possible though is exactly-once processing. By adding a unique idempotency key to each message, you can enable consumers to recognize and ignore duplicate messages, i.e. messages which they have received and successfully processed before.