conduktor.io ↗

KIP-358 — Migrate Streams API to Duration instead of long ms times

Accepted Kafka 2.1 Streams

Replaces all `long`-typed millisecond duration parameters in the Kafka Streams public API (`Stores.windowedBy`, `KStream.groupByKey().windowedBy`, `KafkaStreams.close`, etc.) with `java.time.Duration`. Using raw `long` milliseconds provides no compile-time unit safety and makes API semantics ambiguous — callers cannot tell whether a parameter is seconds, milliseconds, or nanoseconds.

Details

AuthorNikolay Izhikov
StatusAccepted
Kafka Version2.1
JIRAKAFKA-7277
WikiView on Apache Wiki
Created2018-08-16
Last Modified2018-10-09
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.