Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 14781 invoked from network); 15 May 2006 14:15:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 May 2006 14:15:02 -0000 Received: (qmail 42388 invoked by uid 500); 15 May 2006 14:15:01 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 42239 invoked by uid 500); 15 May 2006 14:15:01 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 42230 invoked by uid 99); 15 May 2006 14:15:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 May 2006 07:15:01 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.100.65.198] (HELO BUTTHEAD.daxtechnologies.com) (66.100.65.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 May 2006 07:15:00 -0700 Received: from BEAVIS.daxtechnologies.com ([192.168.0.1]) by BUTTHEAD.daxtechnologies.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 15 May 2006 10:14:29 -0400 Received: from [192.168.0.34] ([192.168.0.34]) by BEAVIS.daxtechnologies.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 15 May 2006 10:14:28 -0400 Message-ID: <44688CBA.40400@daxtechnologies.com> Date: Mon, 15 May 2006 10:14:18 -0400 From: Adrian Tarau User-Agent: Mail/News 1.5 (X11/20060214) MIME-Version: 1.0 To: activemq-users@geronimo.apache.org Subject: Re: Remove all messages from a queue References: <4354353.post@talk.nabble.com> <4464A4DA.5030108@daxtechnologies.com> <4464A513.4010403@daxtechnologies.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 May 2006 14:14:28.0984 (UTC) FILETIME=[E0F5DF80:01C67829] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N And without JMX? :) I saw that org.apache.activemq.broker.region.Queue expose that purge, but how can I reach this class knowing my queue? James Strachan wrote: > On 5/12/06, Adrian Tarau wrote: >> How could I remove all messages from a queue? Thanks. >> >> PS : Except consuming one by one :) > > Try using JMX.... > http://activemq.org/site/jmx.html > > the Queue mbean has a pureQueue method > http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/broker/jmx/QueueViewMBean.html#purge() > >