activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: Purge policy not working?
Date Fri, 05 Apr 2013 18:56:23 GMT
Ahh i see ... so gcInactiveDestination will only discard the destination if
it doesn't have any messages... Maybe you can set a JMS time to live on
your messages so they get expired if they sit for too ling?


On Fri, Apr 5, 2013 at 11:14 AM, SledgeHammer <grosin@firstam.com> wrote:

> ceposta wrote
> > What version are you using?
> >
> > How are you seeing that messages are not purged? When the connection goes
> > away, the temp destination should go away as well.
>
> I am using 5.8.0 latest. I clear everything out and I have 0 messages and 0
> consumers. I run the producer and it generates 1000 messages. Web console
> shows 1000 messages / 0 consumers. I then kill the producer. The 1000
> messages never go away. If I start up a client, it gets the messages, but
> since the replyto address is invalid,  I get the
> Apache.NMS.InvalidDestinationException.
>
> I'm doing something like:
>
> IDestination destination = SessionUtil.GetDestination(session,
> "queue://Test");
> ITemporaryQueue queue = session.CreateTemporaryQueue();
>
> using (IMessageProducer producer = session.CreateProducer(destination))
> {
>         connection.Start();
>
>         for (int i = 0; i < 1000; i++)
>         {
>                 ITextMessage msg = session.CreateTextMessage("Hello
> World!" + i);
>                 msg.NMSReplyTo = queue;
>                 msg.NMSCorrelationID = Guid.NewGuid().ToString();
>                 System.Diagnostics.Debug.WriteLine("SEND " + i);
>                 producer.Send(msg);
>         }
> }
>
> thats my producer code. If I kill this process the temp queue "queue"
> becomes invalid as it should. But messages that have that queue in the
> NMSReplyTo address are never deleted.
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Purge-policy-not-working-tp4665624p4665628.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message