0

I have a data stream using keyBy and then flatMap. How can I want to write the output to a queue and preserve time order across all keys?

dataSrc // just a stream of longs
    .keyBy(value -> value % 4)
    .window(TumblingEventTimeWindows.of(Time.minutes(1)))
    .flatMap((value1, value2) -> 
        {
            if (value2.longValue > value1.longValue) {
                return value2;
            }
            return value1;
        });
  
flink182
  • 1
  • 1

0 Answers0