Hello Folks! I have a DataStream which sends data to the consumer but I got the data once the code completed its execution. I didn't receive the records as the code was writing it to the topic. I was able to achieve this behavior using AT_LEAST_ONCE property but I decided to implement Watermarks. I haven't enabled checkpointing as of now. I know checkpointing will also do the trick. My expectation is Producer should batch the records of 2 seconds and send it to the consumer and consumer should receive a batch of 2 seconds. My code goes as below:
*Producer Side*: dataToKafka.assignTimestampsAndWatermarks( WatermarkStrategy .forBoundedOutOfOrderness[String](Duration.ofSeconds(2))) dataToKafka.addSink(myProducer).uid("source") *Consumer Side*: consumer.assignTimestampsAndWatermarks( WatermarkStrategy .forBoundedOutOfOrderness[String](Duration.ofSeconds(2))) Now this gives me an error as below: Static methods in interface require -target:jvm-1.8 .forBoundedOutOfOrderness[String](Duration.ofSeconds(2))) My scala version is 2.11.12 and Java JDK 1.8.0.281 Thanks, Martin.