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.

Reply via email to