"ataylor" wrote : anonymous wrote : The iterator needs to be clever enough that
if messages are removed when it tries to go to the next one, it reverts back to the
beginning of the queue.
|
| I don't see how its that simple, if you take the simplest scenario, i.e. only 1
priority list in the queue and you're current index is 5, if you remove a message from
the queue you need to move to current index - 1 not the beginning of the queue.
|
In most cases, refs are only ever removed from the head of the queue, so you can just go
back to the beginning of the queue. That's the 99% case and is pretty trivial.
That's not true in the case you have consumers with selectors, when refs can be
removed from other places in the queue, which is like many things is the 1% case that is
more difficult.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181499#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...