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