liveBook · Manning

System time

As explained in Kafka Streams in Action, Second Edition

System time is the current wall-clock value maintained by the machine running a producer or broker.

System time is wall-clock time from the Kafka Streams environment. With PunctuationType.WALL_CLOCK_TIME, it drives Punctuator.punctuate at approximately scheduled intervals, regardless of data activity. section 10.2.1 section 10.2.2

Use system-time punctuation when:

  • You need activity performed regularly even when records arrive sporadically. section 10.2.2
  • You can accept best-effort timing: wall-clock time advances during polling, and execution granularity depends on poll-cycle duration. section 10.2.2
  • You want punctuation closer to every ten seconds than data-driven stream-time scheduling provides. section 10.2.2

Scheduling stock-performance checks

A stock-performance processor can schedule a punctuator with context().schedule(10000, PunctuationType.WALL_CLOCK_TIME, punctuator). The check then runs approximately every ten seconds, even when stock transactions are not arriving. section 10.2.1 section 10.2.2

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Explains wall-clock scheduling, polling-based granularity, best-effort timing, and its contrast with stream-time semantics.
Examples
Uses a stock-performance processor scheduled for approximately ten-second checks.
What it assumes
Assumes familiarity with Kafka Streams processors, ProcessorContext, Punctuator, and timestamp-driven stream-time scheduling.
What you can do after
Operate Kafka Streams punctuation with PunctuationType.WALL_CLOCK_TIME when regular data-independent activity matters.
How it connects
Connects Kafka Streams, Processor API, Punctuator, ProcessorContext, polling intervals, and stream-time semantics.

Also explained in

Compare how 3 books explain system time →

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.