You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Fredrik Jonson <fr...@myrealbox.com> on 2006/12/20 13:44:56 UTC
Strange queue size in jconsole?
Hi all,
I have a application that posts messages to a queue, which a client then
polls messages from regularily. The client polls the queue on average more
often than messages are produced, so normally the qeue should be empty.
The messages that are sent all have a limited time to live (from a couple
of minutes to one hour).
If I leave the application running for a while, and some messages are
obsoleted before the clients have fetched them, the QueueSize attribute
never goes down to zero (when I view the queue in jconsole). Even if I
purge the queue from jconsole the queue size isn't reset to 0. And if I
browse the queue, the jconsole browsing window is empty, implying that
the data isn't there (I believe).
I'm using a default AMQ 4.1 installation (no configuration changes)
and jconsole from jdk 1.5/1.6 (same result on both) on linux.
I suspect that the queue size somehow include the number of obsoleted
messages in the queue? Is this expected behaviour, or is this a bug?
--
Fredrik Jonson
Re: Strange queue size in jconsole?
Posted by Fredrik Jonson <fr...@myrealbox.com>.
In <E3...@gmail.com> John Heitmann wrote:
> On Dec 20, 2006, at 4:44 AM, Fredrik Jonson wrote:
> > I suspect that the queue size somehow include the number of obsoleted
> > messages in the queue? Is this expected behaviour, or is this a bug?
>
> It's both. There's a todo in the code to properly update the queue
> size stat when a message expires.
>
> [See:] http://issues.apache.org/activemq/browse/AMQ-879
Thanks for cluing me in!
--
Fredrik Joson
Re: Strange queue size in jconsole?
Posted by John Heitmann <jh...@gmail.com>.
On Dec 20, 2006, at 4:44 AM, Fredrik Jonson wrote:
> I suspect that the queue size somehow include the number of obsoleted
> messages in the queue? Is this expected behaviour, or is this a bug?
It's both. There's a todo in the code to properly update the queue
size stat when a message expires. For most stats ActiveMQ doesn't
directly query for the information (for example there's nothing like
persistenceAdapter.getQueueSize("my.queue") currently), rather it
keeps running counters that change based on various events. This
unfortunately means that stats can disagree with reality when there
are bugs or gaps in the implementation. This of course should be
pretty rare.
It looks like someone filed a Jira on this a few months ago: http://
issues.apache.org/activemq/browse/AMQ-879
John