Hi, thanks for the link, the solution in that thread is for Kafka and It seems to be a different issue.

I need to stop the process when I reach the events that were available at the time I started listening, so the process will complete NOT when the queue is empty but when I reached a specific point in time on the queue.

Thanks!