blob: c82b53b9aa0cf783f7591e3e741ea4d8f5aad7b6 [file] [log] [blame]
<div class="wiki-content maincontent"><p>A frequent requirement is to purge a queue (i.e. delete all the messages on it).</p>
<h3 id="HowdoIpurgeaqueue-Solution">Solution</h3>
<p>You can use the <a shape="rect" href="web-console.html">Web Console</a> to view queues, add/remove queues, purge queues or delete/forward individual messages.</p>
<p>Another option is to use <a shape="rect" href="jmx.html">JMX</a> to browse the queues and call the <strong>purge()</strong> method on the <a shape="rect" class="external-link" href="http://activemq.apache.org/maven/apidocs/org/apache/activemq/broker/jmx/QueueViewMBean.html">QueueViewMBean</a>. </p>
<p>You could also delete the queue via removeQueue(String) or removeTopic(String) methods on the <a shape="rect" class="external-link" href="http://activemq.apache.org/maven/apidocs/org/apache/activemq/broker/jmx/BrokerViewMBean.html">BrokerViewMBean</a></p>
<p>You can also do it <a shape="rect" href="how-can-i-see-what-destinations-are-used.html">programmatically</a></p>
<h3 id="HowdoIpurgeaqueue-AlsoSee">Also See</h3>
<ul><li><a shape="rect" href="web-console.html">Web Console</a></li><li><a shape="rect" href="jmx.html">JMX</a></li><li><a shape="rect" href="how-do-i-find-the-size-of-a-queue.html">How do I find the Size of a Queue</a></li><li><a shape="rect" href="how-can-i-see-what-destinations-are-used.html">How can I see what destinations are used</a></li></ul></div>