You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Lucas Blue <lu...@yahoo.com> on 2007/04/21 03:38:52 UTC

Can I modify msgs in the queue?

Hi.  Suppose I want to modify a Message, once it is already in the queue,
without removing it.  (Perhaps I want to change an int property that was set
on it initially, or perhaps I want to modify the msg itself.)   Is this
possible?  Is there any 'update message' support in ActiveMQ?  If not,
perhaps I could hit the underlying jdbc-based persistence and perform
updates on the appropriate table(s)?  

What I'm trying to do is gradually increase the priority of messages that
are sitting in the queue: the longer they've been waiting, the higher the
priority.  This is a basic 'aging' algorithm.   

I know I can browse all elements using a QueueBrowser, but I see no way to
update those elements. Any ideas? 

Thanks,
Lucas
-- 
View this message in context: http://www.nabble.com/Can-I-modify-msgs-in-the-queue--tf3621433s2354.html#a10112829
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Can I modify msgs in the queue?

Posted by James Strachan <ja...@gmail.com>.
On 4/21/07, Lucas Blue <lu...@yahoo.com> wrote:
>
> Hi.  Suppose I want to modify a Message, once it is already in the queue,
> without removing it.  (Perhaps I want to change an int property that was set
> on it initially, or perhaps I want to modify the msg itself.)   Is this
> possible?  Is there any 'update message' support in ActiveMQ?  If not,
> perhaps I could hit the underlying jdbc-based persistence and perform
> updates on the appropriate table(s)?
>
> What I'm trying to do is gradually increase the priority of messages that
> are sitting in the queue: the longer they've been waiting, the higher the
> priority.  This is a basic 'aging' algorithm.
>
> I know I can browse all elements using a QueueBrowser, but I see no way to
> update those elements. Any ideas?

http://cwiki.apache.org/ACTIVEMQ/can-i-modify-messages-on-a-queue.html

-- 
James
-------
http://macstrac.blogspot.com/