Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 41205 invoked from network); 25 Jun 2009 00:35:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jun 2009 00:35:50 -0000 Received: (qmail 59302 invoked by uid 500); 25 Jun 2009 00:36:01 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 59251 invoked by uid 500); 25 Jun 2009 00:36:01 -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 59241 invoked by uid 99); 25 Jun 2009 00:36:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 00:36:01 +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 bazhenov@farpost.com designates 80.92.162.107 as permitted sender) Received: from [80.92.162.107] (HELO qcf.farpost.ru) (80.92.162.107) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 00:35:50 +0000 Received: from localhost (localhost [127.0.0.1]) by qcf.farpost.ru (Postfix) with ESMTP id 3B4A8285D2 for ; Thu, 25 Jun 2009 11:35:28 +1100 (VLAST) X-Virus-Scanned: amavisd-new at qcf.farpost.ru Received: from qcf.farpost.ru ([127.0.0.1]) by localhost (qcf.farpost.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w5+mMww5T057 for ; Thu, 25 Jun 2009 11:35:28 +1100 (VLAST) Received: by qcf.farpost.ru (Postfix, from userid 501) id 25D082861E; Thu, 25 Jun 2009 11:35:28 +1100 (VLAST) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on qcf.farpost.ru X-Spam-Level: Received: from [172.16.4.139] (unknown [172.16.4.139]) by qcf.farpost.ru (Postfix) with ESMTP id 046D2285D2 for ; Thu, 25 Jun 2009 11:35:28 +1100 (VLAST) Subject: Re: InFlightCount/DispatchCount meaning From: Denis Bazhenov To: users@activemq.apache.org In-Reply-To: <3a73c17c0906240900yc531faeub9b321d16253087a@mail.gmail.com> References: <1245390096.7027.12.camel@bazhenov-desktop> <1c4bf5540906221705l6bba59ecm8910468083bc642b@mail.gmail.com> <3a73c17c0906230851i1c1da511h366265e04830fe73@mail.gmail.com> <1245800102.5829.16.camel@bazhenov-desktop> <3a73c17c0906240900yc531faeub9b321d16253087a@mail.gmail.com> Content-Type: text/plain Organization: FarPost. Date: Thu, 25 Jun 2009 11:35:32 +1100 Message-Id: <1245890132.14446.4.camel@bazhenov-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-98.3 required=7.0 tests=ALL_TRUSTED,BAYES_99, USER_IN_WHITELIST autolearn=no version=3.2.3 Yeah, but I have fast consumers and slow producers. In my case InFlightCount must be about zero, I guess. This is because of producers too slow to generate a lot of messages for consumers. Do I miss something? On Wed, 2009-06-24 at 17:00 +0100, Gary Tully wrote: > the inflight count means inflight to a consumers session, not necessarily > received and unacked by a consumer. You must have 6 consumers. There is an > additional prefetch extension that is used in transactions when a message is > delivered so that a transction can span the prefetch limit. > > 2009/6/24 Denis Bazhenov > > > There is one more aspect that I don't understand. > > > > My queue InFlightCount value vary about 6000. One moment it's exactly > > 6000, another moment it's 6012 and so on (but never <6000). So new > > messages are acknowledged correctly, but there is 6K messages that were > > not commited by consumer, I guess. > > > > We have 2 options here. First of all maybe these 6K messages were > > dispatched to another consumer (and acknowledged), so InFlightCount must > > be equals zero. Second option is that these 6K messages are not > > dispatched to another consumer and hang up somewhere. > > > > Where is truth? > > > > P.S. Browse method on queue (via JMX console) says that queue doesn't > > have messages. > > > > On Tue, 2009-06-23 at 16:51 +0100, Gary Tully wrote: > > > the prefetch has a large bearing on this, it defaults to 1000 for queues. > > > > > > If you have lots of consumers that consume just a few messages (say 100), > > > each will get dispatched up to the prefetch value, and when the consumer > > > closes, the remaining 900 will get dispatched again to another consumer. > > > > > > Hence dispatchCount total can increase past the enqueue count. > > > The inflightCount is the sum of the current non committed prefetched > > > messages for existing consumers. > > > > > > For more info on prefetch see: > > > http://activemq.apache.org/what-is-the-prefetch-limit-for.html > > > > > > > > > 2009/6/23 David Sitsky > > > > > > > 2009/6/19 Denis Bazhenov : > > > > > I'm interested in following topic. What does the InFlightCount mean > > if > > > > > JMX console for queue. > > > > > > > > > > It's seems like in flight count is difference between dequeue count > > and > > > > > dispatch count. But I have very strange situation. > > > > > > > > > > I have a queue which have following statistic: > > > > > > > > > > DequeueCount: 55189 > > > > > DispatchCount: 77525 > > > > > EnqueueCount: 55191 > > > > > InFlightCount: 22336 > > > > > QueueSize: 2 > > > > > > > > > > How can I dispatch more messages than I enqueue? Can anyone explain > > what > > > > > does this numbers mean? > > > > > > > > Note that DequeueCount + InFlightCount == DispatchCount. > > > > > > > > From my understanding: > > > > > > > > EnqueueCount = Number of messages sent to a queue and committed. > > > > > > > > DequeueCount = Number of messages removed from a queue and committed. > > > > > > > > DispatchCount = Number of messages sent from this queue to consumers. > > > > Includes messages which were not commit()ed, but rolledback. > > > > > > > > InFlightCount = Number of messages sent from this queue to consumers > > > > that haven't been committed. > > > > > > > > Given you large difference in DispatchCount compared to DequeueCount, > > > > perhaps a lot of your consumers are failing when they receive a > > > > message, and don't call commit(). > > > > > > > > -- > > > > Cheers, > > > > David > > > > > > > > Nuix Pty Ltd > > > > Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 9280 > > 0699 > > > > Web: http://www.nuix.com Fax: +61 2 9212 > > 6902 > > > > > > > > > > > > > > > -- > > Denis Bazhenov > > FarPost. > > > > > > -- Denis Bazhenov FarPost.