Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 16905 invoked from network); 24 Aug 2007 12:08:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Aug 2007 12:08:21 -0000 Received: (qmail 26559 invoked by uid 500); 24 Aug 2007 12:08:16 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 26525 invoked by uid 500); 24 Aug 2007 12:08:16 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 26516 invoked by uid 99); 24 Aug 2007 12:08:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 05:08:16 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dziugas@gmail.com designates 209.85.132.249 as permitted sender) Received: from [209.85.132.249] (HELO an-out-0708.google.com) (209.85.132.249) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 12:08:11 +0000 Received: by an-out-0708.google.com with SMTP id b8so85323ana for ; Fri, 24 Aug 2007 05:07:50 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=K7jO0B56yaQw9b7Lvqgqxf8EKubyfge3h9ulciIrmjEDi0HGNRIyoN1Bl0+zm7rby/UlSAy+yXbwKxsH54PUCVsp5Xqse7Yr7mOgmwJ8T8STwpWZ5sCxAqbOqLiGyGQ/Bq7ECz3bpMj1A2tsDSK5zvrgwRRgGWPSgYUfYxOMaOY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=iDVqf8vE4GFuO3kcEo1VC1smBrv6jsBKhSPrC8udJkMutQ0XmjwE3KsHvY7+EynDpUd66HnahUU4X59B35itfaqLgxWYH1m3u4viHl9DkFvZw/gpbr+vRYm2LFsEMRBMofyv5JkPO6v99NHAPG0jIS7q5b/eUpggj2NB2ikQO28= Received: by 10.78.149.15 with SMTP id w15mr1915788hud.1187957269255; Fri, 24 Aug 2007 05:07:49 -0700 (PDT) Received: by 10.78.39.3 with HTTP; Fri, 24 Aug 2007 05:07:49 -0700 (PDT) Message-ID: <943470880708240507s29676368sf8c302872c91f294@mail.gmail.com> Date: Fri, 24 Aug 2007 15:07:49 +0300 From: "Dziugas Baltrunas" Sender: dziugas@gmail.com To: users@activemq.apache.org Subject: Re: When QueueView.purge() does not actually purge? In-Reply-To: <943470880708060558t130e9091g295d18cc0a949c78@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <943470880708060558t130e9091g295d18cc0a949c78@mail.gmail.com> X-Google-Sender-Auth: 0e28184547b0b638 X-Virus-Checked: Checked by ClamAV on apache.org Hi, any thoughts on this issue? What I've also faced is that especially with activemq-cpp, when the process is killed abnormally (that is, without closing connection to broker), ActiveMQ broker keeps connection as active (visible via JMX, org.apache.activemq->localhost->Connection->openwire) and the ConsumerCount for the queues now already dead connection was listening to also does not decrease. So the questions narrow to the following: 1. Why killing activemq-cpp process abnormally does not flush the connection from the broker and dead connection is visible as "active" from within JMX? 2. Why non-persistent messages keep staying in the queue when activemq-cpp async consumer with cms::Session::AUTO_ACKNOWLEDGE mode crashes with exception (like reading empty String property, in activemq::connector::openwire::utils::OpenwireStringSupport::readString)? 3. Why JMX QueueView.purge() method does not actually purge queue (for those messages appeared due to activemq-cpp crash)? Thanks. Regards, Dziugas Baltrunas On 8/6/07, Dziugas Baltrunas wrote: > Hello, > > I'm using Apache ActiveMQ 4.1.1 with the default configuration. I > noticed that in some cases JMX expoded purge() method does not > actually purge messages from the queue. > > I'm not yet able to reproduce the situation, so I'll just describe > some details. My producer side is standard Java application and > consumer side is made using activemq-cpp (2.01, openWire protocol). > When cpp consumer fails with some unhandled IOException (for example, > when BytesMessage body is empty), message is not removed from the > queue (since it's not acknowledged?). However, trying to remove it by > using JMX purge() does not remove message from queue. What is more, > restarting activemq process also does not help - when the queue is > recreated (via session.createQueue()), old messages appear again in > the queue. Only deleting queue via JMX removeQueue() helps. Looks like > it happens for messages having both PERSISTENT and NON_PERSISTENT > delivery modes. > > I'm wondering to know in which circumstances purge() might not > actually purge the queue and why ActiveMQ process restart does not > flush the data for NON_PERSISTENT messages? > > Thanks in advance. > > Regards, > Dziugas Baltrunas >