You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Robert Davies <ra...@gmail.com> on 2013/05/28 23:10:53 UTC

Re: Cleaning up queues...

1. set a timeToLive on your messages http://activemq.apache.org/how-do-i-set-the-message-expiration.html - this means that if the producer crashes, the messages will get cleaned up at some point
2. Enable gc on destinations - http://activemq.apache.org/delete-inactive-destinations.html - which will kick in once messages have been consumed or expired.

On 26 Apr 2013, at 21:06, SledgeHammer <gr...@firstam.com> wrote:

> Per a previous thread, it was suggested to me to have each producer create
> its own queue so that I can implement a "round-robin the producers" type
> scheme... so I'm doing something like:
> 
> _destination = SessionUtil.GetDestination(_session, _strQueueName);
> 
> _strQueueName is initialized as String.Format("queue://{0}",
> Guid.NewGuid().ToString());
> 
> this part all works fine, I can create and delete the queue and send & recv.
> Problem is if the producer doesn't play nice or crashes, etc. it's going to
> leave it queue around.
> 
> Is there a way to have the queue delete itself if the producer doesn't exit
> clean? I saw a policy that can delete inactive queues, but that requires the
> queue to be empty. I can not have a lifetime on the messages.
> 
> I can't use a temp queue either because I need it to show up in the admin
> page for monitoring purposes.
> 
> I can have an arbitrary number of producers... I just want to make sure that
> I don't end up with 1000 dummy queues on the admin page if producers don't
> exit clean.
> 
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Cleaning-up-queues-tp4666286.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.