[fpc-pascal] TObjectQueue with ability to dequeue arbitrary positions

waldo kitty wkitty42 at windstream.net
Sat Aug 25 21:46:07 CEST 2012


On 8/24/2012 14:57, Jorge Aldo G. de F. Junior wrote:
[trim]
> When the object issues request it has to keep looping (until timeout)
> and dequeueing the last message from the mailbox, inspecting its
> transaction id for a match and requeueing the same message back into
> the mailbox if theres no match.
>
> Thats the problem. When messages are requeued i lose message order
> guarantees (Very usefull). They are still guaranteed to be delivered,
> but not in order anymore.

when i got here, my first thought was why not add a queueID which is nothing 
more than a sequential serial number that gets reset to zero when the queue is 
empty... then keep the queue sorted on this ID... that should keep the queue in 
order... shouldn't it?




More information about the fpc-pascal mailing list