KIP-1325 — Add restore.buffered.records.per.partition to cap Kafka Streams state-restore memory
Accepted Kafka 4.5 Streams
Adds a restore.buffered.records.per.partition StreamsConfig that caps the per-partition restore buffer in StoreChangelogReader, pausing the restore consumer on partitions whose ChangelogMetadata buffer is full and resuming them once records have been applied to the state store. Kafka Streams enforces buffered.records.per.partition on the normal processing path but had no limit on the restore path, so large backfills could buffer changelog records unboundedly and trigger OutOfMemoryError.
Details
| Author | Muralidhar Basani |
| Status | Accepted |
| Kafka Version | 4.5 |
| JIRA | KAFKA-19992 |
| Wiki | View on Apache Wiki |
| Created | 2026-04-23 |
| Last Modified | 2026-05-27 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.