But I don't understand the last patch at all. Yes, it probably causes, that infinite loop is finished (in some iterations). But I guess that JMX monitoring
still display wrong information and cursor and store are still out of sync or I miss something?
Could you explain me the "cursor and store are out of sync" commit? I didn't find the test for it.
Any idea how to create example, which should simulate this "endless loop" of doBrowse(...) method
invoked from org.apache.activemq.broker.region.Queue.expireMessages() method initiated by "expireMessagesTask".