Search code examples
apache-flinkflink-streamingflink-sql

How Can I deal with Idleness in kafka source for watermarks using Table or SQL api?


We can handle the idleness in datastream api via this code block:

WatermarkStrategy
        .<Tuple2<Long,String>>forBoundedOutOfOrderness(Duration.ofSeconds(20))
        .withIdleness(Duration.ofMinutes(1));

But is something similar possible in flink table/SQL api?


Solution

  • You can set table.exec.source.idle-timeout. See https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/table/config/#table-exec-source-idle-timeout for more info.