KIP-1225 — Add Optional TTL Support to Kafka Streams State Stores
Discussion Streams
Adds a withTtl(Duration) option to Kafka Streams state store builders that automatically expires and tombstones entries older than the specified TTL using wall-clock time. Developers currently must manually implement TTL by embedding timestamps in values, scheduling punctuations, and iterating over all entries to delete expired records — boilerplate logic that is inconsistent across topologies and mishandles timestamp regression.
Details
| Author | Ankur Ankur |
| Status | Discussion |
| JIRA | KAFKA-19759 |
| Wiki | View on Apache Wiki |
| Created | 2025-10-07 |
| Last Modified | 2025-10-07 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.