liveBook · Manning

Strict buffering

As explained in Kafka Streams in Action, Second Edition

Strict buffering is a buffering policy that enforces a configured record or byte limit and shuts down the application when the limit is exceeded.

Strict buffering is a Kafka Streams suppression policy that retains intermediate window results and emits none until the window closes, guaranteeing a final result without duplicates. section 9.3 section 9.3.1

Strict buffering makes an explicit reliability-versus-capacity tradeoff:

  • Retains results for each key until the associated window closes. section 9.3
  • Guarantees one final windowed result and prevents early downstream updates. section 9.3
  • Can use a record or byte limit; exceeding that limit triggers a graceful application shutdown. section 9.3.1
  • Leaves the unbounded configuration exposed to possible out-of-memory failure when buffered state grows too large. section 9.3

Bounded final-result suppression

A session aggregation can suppress updates until its window closes and shut down gracefully if more than 10,000 records accumulate: .suppress(untilWindowCloses(maxRecords(10_000)).shutDownWhenFull()). section 9.3.1

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Defines time-bound emission and configurable record or byte limits, stopping at shutdown behavior rather than implementation internals.
Examples
Uses page-view session aggregation, unbounded suppression, and a 10,000-record shutdown threshold.
What it assumes
Assumes windowed aggregation and suppression concepts while demonstrating the strict policy from configuration examples.
What you can do after
Operate/configure Kafka Streams suppression with unbounded, maximum-record, or maximum-byte buffering policies.
How it connects
Connects suppression with windowed aggregation, final results, eager buffering, and out-of-memory risk.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.