Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 58633 invoked from network); 9 Aug 2009 16:34:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Aug 2009 16:34:27 -0000 Received: (qmail 8179 invoked by uid 500); 9 Aug 2009 16:34:34 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 8105 invoked by uid 500); 9 Aug 2009 16:34:34 -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 8095 invoked by uid 99); 9 Aug 2009 16:34:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Aug 2009 16:34:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rajdavies@gmail.com designates 209.85.219.218 as permitted sender) Received: from [209.85.219.218] (HELO mail-ew0-f218.google.com) (209.85.219.218) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Aug 2009 16:34:22 +0000 Received: by ewy18 with SMTP id 18so3193911ewy.38 for ; Sun, 09 Aug 2009 09:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=pC2ecNkHg/XhtuEJ0mk8ZghvuGXsF9YhAb/vkpiP930=; b=BFiCGENR+61WyCmBXL9V6vczFp5xLcIk90qo2yJqXly3abmuI5CsvpKYlO/8JmTYRX oDESEvTgBe6DIp0/mb+Tppek6OUpJINn41BGoBToBxXwA3BLjRRm8LzNzLqLIMyTUDF3 9eg634A5sMWnCPASgMHZxWQQqaSC3EKKppfE8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=X0r+ciVe8QB46oBneyw+mMxigPpHjxc+KRnd0kg1PTx4Bqzbe2gsf+Jk6bpI4+Cqkt LNxiPOWX9h7uku7HMu5RICdFoZFE+8FkjaWUMohJ+bRNtRz4haDSEesCjkvwJPQfbsmf xM1NZozTjuhDky1nJO57WBP2rEWaJQvPqfE30= Received: by 10.210.58.13 with SMTP id g13mr4063193eba.51.1249835642526; Sun, 09 Aug 2009 09:34:02 -0700 (PDT) Received: from rexmac.home ([81.147.85.27]) by mx.google.com with ESMTPS id 5sm5912109eyh.36.2009.08.09.09.34.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 09 Aug 2009 09:34:01 -0700 (PDT) Message-Id: <9EDC304C-B731-4845-838C-4A00FF7A6ADB@gmail.com> From: Rob Davies To: users@activemq.apache.org In-Reply-To: <24887648.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: How to tell if everything in a queue has been processed Date: Sun, 9 Aug 2009 17:34:00 +0100 References: <24887648.post@talk.nabble.com> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org On 9 Aug 2009, at 15:32, amp834 wrote: > > I'm using ActiveMQ to "Submit a job" to queue "Job53" (a queue for > each job), > with (say) 500 subtasks, and want to know when the 500 items have been > processed completely. I thought of creating a queue just for that > job, > writing 500 messages to it, and when the 500 messages have been > processed, > the job is done. > > Is there a way to tell if a queue is empty? (no messages in the > queue, no > messages that a consumer has taken but has not finished processing)? > > I found an old post, but it's so old that I thought I'd ask the > question > again. > http://www.nabble.com/Query-the-number-of-messages-from-a-Queue-to3652780.html#a3653404 > > -- > View this message in context: http://www.nabble.com/How-to-tell-if-everything-in-a-queue-has-been-processed-tp24887648p24887648.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > You can either use JMX - as the old post suggested - or enable message consumed advisory - to get informed out when a message has been consumed from the queue - see http://activemq.apache.org/advisory-message.html cheers, Rob Rob Davies I work here: http://fusesource.com My Blog: http://rajdavies.blogspot.com/ I'm writing this: http://www.manning.com/snyder/