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
| Author | Nikolay Izhikov |
| Status | Accepted |
| Kafka Version | 2.1 |
| JIRA | KAFKA-7277 |
| Wiki | View on Apache Wiki |
| Created | 2018-08-16 |
| Last Modified | 2018-10-09 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.