activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kimmking <kimmking...@gmail.com>
Subject Runaway producer: Proper way to clean up a topic?
Date Sat, 08 Feb 2014 02:03:47 GMT

Use deleteAllMessagesOnStartup option:  
https://activemq.apache.org/broker-uri.html


From: jlindwall [via ActiveMQ]
Date: 2014-02-08 05:26
To: kimmking
Subject: Runaway producer: Proper way to clean up a topic?
In a previous post I described a problem that occurred in a jdbc-backed 5.9.0 broker with
a durable subscriber.  The producers got way ahead of the consumer (which disconnected though
did not unsubscribe).  I had to restart activemq as it was hung. 

The messages in the topic had a 30 sec expiration so they were all well expired by then. 

I had hoped that when I restarted the broker it would clear out the ACTIVEMQ_MSGS table, as
all the records were expired.  Nope. 

However, an activemq timer thread slowly started cleaning up the records, 1 per second.  At
that rate it was going to take 87 hours to clean them all out! 

I then used the console to destroy the durable subscription, thinking that would accelerate
the process. Nope.  In fact the 1 second timer ceased functioning. 

At this point I deleted the records by hand using SQL. 

What did I do wrong?  What would be the correct way to clear out the topic in the event of
such a scenario? 

Thanks 
John 








If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/Runaway-producer-Proper-way-to-clean-up-a-topic-tp4677644.html

To unsubscribe from ActiveMQ - User, click here.
NAML 



--
View this message in context: http://activemq.2283324.n4.nabble.com/Runaway-producer-Proper-way-to-clean-up-a-topic-tp4677644p4677654.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message