kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Roesler <j...@confluent.io>
Subject Re: replace usage of TimeWindows.until() from Kafka Streams 2.2
Date Mon, 24 Jun 2019 14:50:57 GMT
Hey Sendoh,

I think you just overlooked the javadoc in your search, which says:

> @deprecated since 2.1. Use {@link Materialized#withRetention(Duration)} or directly configure
the retention in a store supplier and use {@link Materialized#as(WindowBytesStoreSupplier)}.

Sorry for the confusion,
-John

On Mon, Jun 24, 2019 at 5:05 AM unicorn.banachi@gmail.com
<unicorn.banachi@gmail.com> wrote:
>
> Hi Kafka Streams user,
>
> I have this usage of  Kafka Streams and it works well that sets retention time in KTable,
both in the internal topics and RocksDB local states.
>
> final KStream<Integer, String> eventStream = builder
>                 .stream("events",
>                         Consumed.with(Serdes.Integer(), Serdes.String())
>                                 .withOffsetResetPolicy(Topology.AutoOffsetReset.EARLIEST));
>
> eventStream.groupByKey()
> .windowedBy(TimeWindows.of(Duration.ofSeconds(200)).until(Duration.ofSeconds(3000).toMillis()))
>                 .reduce((oldValue, newValue) -> newValue);
>
> I saw until() is deprecated from 2.2. What would be the replacement of such usage?
> I checked the Materialized related document but cannot find any
>
> Best,
>
> Sendoh

Mime
View raw message