activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Bazhenov <bazhe...@farpost.com>
Subject Re: InFlightCount/DispatchCount meaning
Date Tue, 23 Jun 2009 23:35:02 GMT
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 <sits@nuix.com>
> 
> > 2009/6/19 Denis Bazhenov <bazhenov@farpost.com>:
> > > 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 <bazhenov@farpost.com>
FarPost.


Mime
View raw message