Hi, All There is something about pageIterator scanning that haunts us over a long period of time since we use artemis.
The use case is common: E.g. There is a topic with two queues: q1 and q2. Due to some reasons such as a bug in the business logic, the clients stop from receiving from q1 and following messages sent to the topic are not routed to q1 again(the clients don't want to receive messages until they get back online). After a few days, the clients are backup starting to consume messages from the queue. At this point, calling hasNext will scan page files until finding matching messages(actually no messages matched before this point and dozens of GB page files are written during business down time). This will lead to some problems: 1. Critical analyzer will be triggered, i.e. CRITICAL_CHECK_DEPAGE. In our setup, the process would be terminated. 2. hasNext might be called in queue's executor, as we know, the executor is shared by all the queues binding to the address, this would cause starvation on other queues resulting no messages delivered lasting for a few minutes. One of the alternative approach i can think is to add some timeout for hasNext/next. If timeout happens, it will be scheduled later to avoid problems above mentioned. Does anybody have any opinion on this? Thanks in advance.
