Hi, take a look at the following article
http://activemq.apache.org/how-can-i-support-priority-queues.html Cheers -- Dejan Bosanac http://www.ttmsolutions.com - get a free ActiveMQ user guide ActiveMQ in Action - http://www.manning.com/snyder/ Scripting in Java - http://www.scriptinginjava.net Vadim Chekan wrote: > Hi All, > If I want to receive the queue in reverse order, does it mean that > I've designed something wrong? :) > > I have a transaction in my application which consist of up to 100K > little actions. I want to implement rollback functionality. My initial > idea was to create a queue where I send a "compensating transaction" > for each action which has been successfully executed. In case of > rollback event I would execute actions from this rollback queue. > But the problem is that I need to execute actions in reverse order. > Action which has been executed last must be undone first. > > It seems I'll have to store my actions in DB and in case of rollback > I'll generate appropriate compensating transactions. > I'm just curious if there are any known design patterns for this problem. > >