activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew" <and...@oc384.net>
Subject RE: purging an ActiveMQ queue
Date Wed, 05 Mar 2008 15:49:07 GMT
Thanks I'll create it as retroactive.  Problem is, how can I tell the broker
to purge the msgs at midnight so I get only msgs from the current day?
Would I just schedule a messageConsumer.close() ?

Thanks,
Andrew


-----Original Message-----
From: James Strachan [mailto:james.strachan@gmail.com] 
Sent: Wednesday, March 05, 2008 12:17 AM
To: users@activemq.apache.org
Subject: Re: purging an ActiveMQ queue

On 04/03/2008, Andrew <andrew@oc384.net> wrote:
> I would like to set up a topic or queue so that when a client connects to
>  the broker and subscribes to that topic he receives a refresh of all the
>  messages sent so far on that topic that day.  At midnight the broker
should
>  purge the day's messages.  What's the best way to do that?

For queues, messages stay on a queue until they expire. For topics,
normally you only get messages sent after you start subscribing
(unless you use persistent topic subscriptions) though ActiveMQ
supports Subscription Recovery for this kinda stuff...

http://activemq.apache.org/subscription-recovery-policy.html

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

Open Source Integration
http://open.iona.com


Mime
View raw message