Re: Make 'QueueStorePrefetch' public?

2023-06-21 Thread Endre Stølsvik
I have done a stab at a "Fair" StoreQueueCursor. It would be great if we could discuss whether something like this is desireable, and feasible to get into ActiveMQ. I am not sure of the semantics wrt. the store - whether this could leave a message stranded in case of powerloss or somesuch. I hope

Re: Make 'QueueStorePrefetch' public?

2023-06-19 Thread Endre Stølsvik
Hmm.. You asked for code. As you hopefully saw, there was already code in my initial message - the minor suggested very simple change actually makes the situation better, by consuming "fairly" between the two buckets. And here's some more code - my research-repo for this, with a set of tests, and

Re: Make 'QueueStorePrefetch' public?

2023-06-19 Thread Matt Pavlovich
Hi Endre- > On Jun 19, 2023, at 2:49 PM, Endre Stølsvik wrote: > > I have explained why. I have suggested a half-way fix, which for most users > probably would be better than the current situation. I have also suggested > the gist of a complete fix. The ActiveMQ v5.18.2 release is in progress,

Re: Make 'QueueStorePrefetch' public?

2023-06-19 Thread Endre Stølsvik
Hi! I must clearly have miscommunicatied or undercommunicated the issue here. Or you have not read my email fully. This is the gist: There is a bug in ActiveMQ. ActiveMQ's default queue handling mechanism is completely broken if you mix persistent and non-persistent messages on the same queue. P

Re: Make 'QueueStorePrefetch' public?

2023-06-19 Thread Matt Pavlovich
Hi Endre- Contributions are always welcome =). Sample unit test scenarios and/or PRs that demonstrate the issue and an approach to solve for it. That being said, keep in mind that any system that deals with the big three— network I/O, disk I/O & CPU (like messaging and databases) always have t