conduktor.io ↗

KIP-622 — Add currentSystemTimeMs and currentStreamTimeMs to ProcessorContext

Accepted Kafka 3.0 StreamsTesting

Exposes `currentSystemTimeMs()` and `currentStreamTimeMs()` methods on `ProcessorContext` in Kafka Streams, sourcing the timestamps from the Streams runtime rather than `System.currentTimeMillis()`. This makes wall-clock and stream-time usage testable because `MockTime` can control both values during unit tests.

Details

AuthorWilliam Bottrell
StatusAccepted
Kafka Version3.0
JIRAKAFKA-10062
WikiView on Apache Wiki
Created2020-06-09
Last Modified2022-04-14
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.