Can somebody help me with this? I tried several examples where they have
extracted the key from Json and used windowing but as far as I have learnt,
with windowing I will have to use some kind of aggregation but in my use
case there is no aggregation to be performed. I just have to get data for
every 2 secs and call the process function.

-
Martin O

On Fri, Jan 7, 2022 at 11:37 PM Flink Lover <[email protected]> wrote:

> I have an incoming json data like below:
> {"custId": 1,"custFirstName":"Martin",
> "custLastName":"owen","edl_created_at":"2022-03-01 00:00:00"}
>
> Now, this record has been pushed successfully via producer to the
> consumer. But I am willing to get records of say 2 seconds window but I
> don't have any key to use in KeyBy() operation.In this case can I use
> Watermarks? Something like below:
>
> val consumer = new FlinkKafkaConsumer[String]("topic", new
> SimpleStringSchema(), getProperties())
>
> consumer.assignTimestampsAndWatermarks(
>       WatermarkStrategy
>         .forBoundedOutOfOrderness[String](Duration.ofSeconds(2)))
>
> Will this help me to get what I want?
>
> Thanks,
> Martin O.
>

Reply via email to