One way I can think of is: 1. Apply a fake keyBy to the stream and let all the data generate the same key. 2. Use MapState in KeyedProcessFunction on the result of the keyBy above.
But is it a good solution? What's the implication to parallelism? Are there better ways?