Hi Li, From my view I think it would not be eaily use a countWindow if you have different number of records for each key (namely user in this case). I think you may need to user the low level KeyedProcessFunction [1] to keep some state by yourself. For example, each request might also carries the total number of requests of each user, and in the KeyedProcessFunction you might record the received number of requests and total requests of this user in the state. Whenever enough requests is received for each user, it could be known that the message is completely processed and the state of this user could also be cleaned at then.
Best, Yun [1] https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/stream/operators/process_function.html#the-keyedprocessfunction ------------------------------------------------------------------ Sender:Li Wang<liwang0...@gmail.com> Date:2021/01/11 07:10:27 Recipient:<user@flink.apache.org> Theme:Re: Use Flink to process request with list of queries and aggregate Can I get any suggestion? Thanks a lot. - Li -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/